79 lines
3.6 KiB
Bash
Executable File
79 lines
3.6 KiB
Bash
Executable File
#!/bin/sh
|
||
|
||
uci set luci.main.lang=zh_cn
|
||
uci commit luci
|
||
|
||
uci set system.@system[0].timezone=CST-8
|
||
uci set system.@system[0].zonename=Asia/Shanghai
|
||
uci commit system
|
||
|
||
uci set fstab.@global[0].anon_mount=1
|
||
uci commit fstab
|
||
|
||
rm -f /usr/lib/lua/luci/view/admin_status/index/mwan.htm
|
||
rm -f /usr/lib/lua/luci/view/admin_status/index/upnp.htm
|
||
rm -f /usr/lib/lua/luci/view/admin_status/index/ddns.htm
|
||
rm -f /usr/lib/lua/luci/view/admin_status/index/minidlna.htm
|
||
|
||
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/aria2.lua
|
||
sed -i 's/services/nas/g' /usr/lib/lua/luci/view/aria2/overview_status.htm
|
||
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/hd_idle.lua
|
||
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/samba.lua
|
||
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/samba4.lua
|
||
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/minidlna.lua
|
||
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/transmission.lua
|
||
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/mjpg-streamer.lua
|
||
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/p910nd.lua
|
||
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/usb_printer.lua
|
||
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/xunlei.lua
|
||
sed -i 's/services/nas/g' /usr/lib/lua/luci/view/minidlna_status.htm
|
||
|
||
ln -sf /sbin/ip /usr/bin/ip
|
||
|
||
sed -i 's#downloads.openwrt.org#mirrors.cloud.tencent.com/lede#g' /etc/opkg/distfeeds.conf
|
||
sed -i 's/root::0:0:99999:7:::/root:$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF.:0:0:99999:7:::/g' /etc/shadow
|
||
|
||
sed -i "s/# //g" /etc/opkg/distfeeds.conf
|
||
sed -i '/openwrt_luci/ { s/snapshots/releases\/18.06.9/g; }' /etc/opkg/distfeeds.conf
|
||
|
||
sed -i '/REDIRECT --to-ports 53/d' /etc/firewall.user
|
||
echo 'iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53' >> /etc/firewall.user
|
||
echo 'iptables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53' >> /etc/firewall.user
|
||
echo '[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53' >> /etc/firewall.user
|
||
echo '[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53' >> /etc/firewall.user
|
||
|
||
sed -i '/option disabled/d' /etc/config/wireless
|
||
sed -i '/set wireless.radio${devidx}.disabled/d' /lib/wifi/mac80211.sh
|
||
|
||
uci set network.lan.ipaddr='192.168.1.252' # Ĭ<><C4AC>IP<49><50>ַ
|
||
uci set network.lan.proto='static' # <20><>̬IP
|
||
uci set network.lan.type='bridge' # <20>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>:<3A>Ž<EFBFBD>
|
||
uci set network.lan.ifname='eth0' # <20><><EFBFBD><EFBFBD><EFBFBD>˿ڣ<CBBF>Ĭ<EFBFBD><C4AC> eth0<68><30><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
uci set network.lan.netmask='255.255.255.0' # <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
uci set network.lan.gateway='192.168.1.251' # Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>·<EFBFBD><C2B7>IP<49><50>
|
||
uci set network.lan.dns='192.168.1.251 223.5.5.5 119.29.29.29' # Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DNS <20><>ַ
|
||
uci commit network
|
||
|
||
date=`date +%m.%d`
|
||
date1=`date +%h`
|
||
sed -i '/DISTRIB_REVISION/d' /etc/openwrt_release
|
||
echo "DISTRIB_REVISION='v$date'" >> /etc/openwrt_release
|
||
sed -i '/DISTRIB_DESCRIPTION/d' /etc/openwrt_release
|
||
echo "DISTRIB_DESCRIPTION='Openwrt '" >> /etc/openwrt_release
|
||
|
||
sed -i 's/LuCI Master/kenzo/g' /usr/lib/lua/luci/version.lua
|
||
sed -i 's/LuCI openwrt-18.06 branch/kenzo/g' /usr/lib/lua/luci/version.lua
|
||
sed -i 's/LuCI 17.01 Lienol/kenzo/g' /usr/lib/lua/luci/version.lua
|
||
sed -i 's/LuCI openwrt-21.02 branch/kenzo/g' /usr/lib/lua/luci/version.lua
|
||
sed -i '/luciversion/d' /usr/lib/lua/luci/version.lua
|
||
echo 'luciversion = "$date1"' >> /usr/lib/lua/luci/version.lua
|
||
|
||
sed -i '/log-facility/d' /etc/dnsmasq.conf
|
||
echo "log-facility=/dev/null" >> /etc/dnsmasq.conf
|
||
|
||
echo 'hsts=0' > /root/.wgetrc
|
||
|
||
rm -rf /tmp/luci-modulecache/
|
||
rm -f /tmp/luci-indexcache
|
||
|
||
exit 0 |