-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·39 lines (27 loc) · 1.03 KB
/
install.sh
File metadata and controls
executable file
·39 lines (27 loc) · 1.03 KB
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
ip="192.168.8.1"
logtag="sitebase"
source .secrets
mkdir -p dist/
for f in config/*
do
echo "parse $f"
envsubst < $f > dist/$(basename $f)
done
# Copy service config files to dist foldes
cp services/* dist
# Copy required files to device
scp dist/* root@${ip}:/tmp/
scp .secrets root@${ip}:~/
scp .profile root@${ip}:~/
#ssh root@${ip} "/etc/init.d/dropbear restart"
# ssh root@${ip} "opkg update && opkg install gl-files-brower luci"
#ssh root@${ip} "logger -t ${logtag} Update config"
echo "Configure router"
ssh root@${ip} "cat /tmp/dropbear | uci -m import dropbear && uci commit"
ssh root@${ip} "cat /tmp/wireless | uci -m import wireless && uci commit"
ssh root@${ip} "cat /tmp/dhcp | uci -m import dhcp && uci commit"
ssh root@${ip} "cat /tmp/system | uci -m import system && uci commit"
ssh root@${ip} "cat /tmp/glconfig | uci -m import glconfig && uci commit"
#ssh root@${ip} "/etc/init.d/dnsmasq restart"
#ssh root@${ip} "/etc/init.d/odhcpd restart"
#ssh root@${ip} "/etc/init.d/uhttpd restart" # required for SSSL install