-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·30 lines (27 loc) · 2.25 KB
/
install
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
#!/usr/bin/env bash
./bin/openwrt-configuration-for-livebox/install -r "$1" || exit 1
sleep 45
gpg --batch --yes --decrypt-files *.secret.config.asc
scp *.config root@192.168.1.1:/tmp/
ssh root@192.168.1.1 "opkg update && opkg install block-mount ca-certificates ddns-scripts_no-ip_com kmod-fs-ntfs kmod-fs-vfat luci-app-ddns luci-app-minidlna luci-app-nft-qos luci-app-simple-adblock luci-app-uhttpd luci-app-upnp luci-app-wol luci-ssl sslh wget"
ssh root@192.168.1.1 "cat /tmp/common.dhcp.config | uci -m import dhcp && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.dhcp.secret.config | uci -m import dhcp && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.ddns.secret.config | uci -m import ddns && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.firewall.config | uci -m import firewall && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.minidlna.config | uci -m import minidlna && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.network.config | uci -m import network && uci commit"
# no merging for simple-adblock
ssh root@192.168.1.1 "cat /tmp/common.simple-adblock.config | uci import simple-adblock && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.sslh.config | uci -m import sslh && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.system.config | uci -m import system && uci commit"
ssh root@192.168.1.1 "uci del uhttpd.main.listen_https && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.uhttpd.config | uci -m import uhttpd && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.uhttpd.secret.config | uci -m import uhttpd && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.upnpd.config | uci -m import upnpd && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.wireless.config | uci -m import wireless && uci commit"
ssh root@192.168.1.1 "cat /tmp/common.wireless.secret.config | uci -m import wireless && uci commit"
ssh root@192.168.1.1 "wget --output-document=/etc/dropbear/authorized_keys https://raw.githubusercontent.com/nagromc/dotfiles/master/ssh/authorized_keys"
scp common.dropbear.config root@192.168.1.1:/tmp/
ssh root@192.168.1.1 "cat /tmp/common.dropbear.config | uci -m import dropbear && uci commit"
echo "Installation completed. Your router is now rebooting..." && ssh root@192.168.1.1 "reboot"
echo "Remember to change your administrator password."