2019-11-02 11:15:02 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
2020-02-08 23:24:00 +08:00
|
|
|
uci set luci.main.lang=zh_cn
|
2019-11-02 11:15:02 +08:00
|
|
|
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
|
|
|
|
|
|
2020-07-29 21:56:29 +08:00
|
|
|
rm -f /www/luci-static/resources/view/status/include/50_dsl.js
|
|
|
|
|
rm -f /www/luci-static/resources/view/status/include/70_ddns.js
|
|
|
|
|
rm -f /www/luci-static/resources/view/status/include/80_minidlna.js
|
|
|
|
|
rm -f /www/luci-static/resources/view/status/include/80_upnp.js
|
|
|
|
|
|
2019-11-02 11:15:02 +08:00
|
|
|
sed -i 's/\"services\"/\"nas\"/g' /usr/lib/lua/luci/controller/aria2.lua
|
2020-04-13 04:56:30 +08:00
|
|
|
sed -i 's#admin/services#admin/nas#g' /usr/lib/lua/luci/view/aria2/settings_header.htm
|
2020-07-29 21:56:29 +08:00
|
|
|
sed -i 's/services/nas/g' /root/usr/share/luci/menu.d/luci-app-hd-idle.json
|
|
|
|
|
sed -i 's/services/nas/g' /root/usr/share/luci/menu.d/luci-app-minidlna.json
|
|
|
|
|
sed -i 's/services/nas/g' /root/usr/share/luci/menu.d/luci-app-mjpg-streamer.json
|
|
|
|
|
sed -i 's/services/nas/g' /root/usr/share/luci/menu.d/luci-app-p910nd.json
|
2019-11-02 11:15:02 +08:00
|
|
|
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
|
|
|
|
|
|
|
|
|
|
ln -sf /sbin/ip /usr/bin/ip
|
|
|
|
|
|
2020-04-08 00:18:28 +08:00
|
|
|
sed -i 's#http://downloads.openwrt.org#https://mirrors.cloud.tencent.com/lede#g' /etc/opkg/distfeeds.conf
|
2019-11-02 11:15:02 +08:00
|
|
|
sed -i "s/# //g" /etc/opkg/distfeeds.conf
|
|
|
|
|
|
2020-02-01 02:30:25 +08:00
|
|
|
sed -i 's/root::0:0:99999:7:::/root:$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF.:0:0:99999:7:::/g' /etc/shadow
|
|
|
|
|
sed -i 's|root:x:0:0:root:/root:/bin/ash|root:x:0:0:root:/root:/bin/bash|g' /etc/passwd
|
2019-11-02 11:15:02 +08:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
sed -i '/option disabled/d' /etc/config/wireless
|
|
|
|
|
sed -i '/set wireless.radio${devidx}.disabled/d' /lib/wifi/mac80211.sh
|
|
|
|
|
wifi up
|
|
|
|
|
|
|
|
|
|
sed -i '/DISTRIB_REVISION/d' /etc/openwrt_release
|
2019-11-10 00:12:38 +08:00
|
|
|
echo "DISTRIB_REVISION=''" >> /etc/openwrt_release
|
2019-11-02 11:15:02 +08:00
|
|
|
sed -i '/DISTRIB_DESCRIPTION/d' /etc/openwrt_release
|
2020-07-01 13:33:20 +08:00
|
|
|
echo "DISTRIB_DESCRIPTION='OpenWrt Snapshot | Mod20.07 By CTCGFW'" >> /etc/openwrt_release
|
2019-11-02 11:15:02 +08:00
|
|
|
|
2020-04-08 01:58:42 +08:00
|
|
|
sed -i 's/LuCI Master/LuCI Snapshot/g' /usr/lib/lua/luci/version.lua
|
2020-03-22 06:42:35 +08:00
|
|
|
sed -i '/luciversion/d' /usr/lib/lua/luci/version.lua
|
2020-07-01 13:33:20 +08:00
|
|
|
echo 'luciversion = "Mod20.07 by CTCGFW"' >> /usr/lib/lua/luci/version.lua
|
2020-03-22 06:42:35 +08:00
|
|
|
|
2019-11-02 11:15:02 +08:00
|
|
|
sed -i '/log-facility/d' /etc/dnsmasq.conf
|
|
|
|
|
echo "log-facility=/dev/null" >> /etc/dnsmasq.conf
|
|
|
|
|
|
|
|
|
|
rm -rf /tmp/luci-modulecache/
|
|
|
|
|
rm -f /tmp/luci-indexcache
|
|
|
|
|
|
2019-11-02 14:17:43 +08:00
|
|
|
mv /etc/openwrt_banner /etc/banner
|
|
|
|
|
|
2019-11-02 11:15:02 +08:00
|
|
|
exit 0
|