-
Notifications
You must be signed in to change notification settings - Fork 5
/
site_install.sh
executable file
·56 lines (39 loc) · 1.13 KB
/
site_install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh -
# first install relevant packages
ipkg update
ipkg install bin/lighttpd_1.3.14-1_mipsel.ipk
ipkg install bin/lighttpd-mod-fastcgi_1.3.14-1_mipsel.ipk
ipkg install bin/lighttpd-mod-auth_1.3.14-1_mipsel.ipk
ipkg install iptables-mod-extra
ipkg install iptables-mod-ipopt
ipkg install ntpclient
ipkg install libgcc
ipkg install libpthread
# copy ruby over
cp bin/ruby /usr/bin/ruby
# next install configs
cp -f "./etc/*.conf" /etc
cp -f "./etc/init.d/S*" /etc/init.d
cp -f "./etc/init.d/firewall" /etc/init.d
ln -fs /etc/init.d/firewall /etc/init.d/S45firewall
# now copy over the hotspot
mkdir -p /opt/hotspot/www/templates
mkdir /opt/hotspot/lib
cp *.rb /opt/hotspot
cp hotspotd.conf /opt/hotspot
cp www/*.rb www/*.css www/*.js /opt/hotspot/www
cp www/templates/*.html /opt/hotspot/www/templates
cp lib/siki-template.rb /opt/hotspot/lib
cp lib/ruby-fcgi-dispatcher /usr/bin
cp iptables/iptables-wrapper /usr/bin
#copy ruby
mkdir -p /usr/lib/ruby
mv site_ruby /usr/lib/ruby
#fix init.d
cd /etc/init.d
mv S50telnet S42telnet
mv S50dropbear S42dropbear
rm S50httpd
# TODO
# ntpclient
echo "Install finished! reboot and cross fingers"