Created
April 24, 2020 08:44
-
-
Save thuandt/b6b8eb731e340214fb3ea8c664cbb72d to your computer and use it in GitHub Desktop.
OpenWRT setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Setup OpenWRT router | |
set -e | |
if [ -f /etc/upgraded ]; then | |
echo "router has been configured properly!" | |
else | |
if ping -q -c 1 -W 1 8.8.8.8 >/dev/null; then | |
echo "start reconfigure router" | |
echo "nameserver 8.8.8.8" > /etc/resolv.conf | |
echo "install recommended packages for mrtux-router" | |
opkg update | |
opkg install luci-app-wireguard luci-app-uhttpd luci-ssl luci-app-watchcat kmod-sched-cake dnscrypt-proxy2 openvpn-openssl | |
echo "remove conffile" | |
rm /etc/dnscrypt-proxy2/dnscrypt-proxy.toml-opkg | |
echo "create record file" | |
touch /etc/upgraded | |
echo "reboot to apply new configuration" | |
reboot | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment