int
This commit is contained in:
parent
b11106a1ea
commit
577c72c652
|
@ -10,7 +10,6 @@ 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
|
||||
|
@ -20,6 +19,7 @@ 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
|
||||
|
@ -30,19 +30,22 @@ sed -i 's/services/nas/g' /usr/lib/lua/luci/view/minidlna_status.htm
|
|||
|
||||
ln -sf /sbin/ip /usr/bin/ip
|
||||
|
||||
sed -i 's#http://downloads.openwrt.org#https://mirrors.cloud.tencent.com/lede#g' /etc/opkg/distfeeds.conf
|
||||
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.8/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 '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
|
||||
|
||||
date1=`date +%h`
|
||||
sed -i '/DISTRIB_REVISION/d' /etc/openwrt_release
|
||||
echo "DISTRIB_REVISION='small'" >> /etc/openwrt_release
|
||||
sed -i '/DISTRIB_DESCRIPTION/d' /etc/openwrt_release
|
||||
|
@ -53,16 +56,14 @@ 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 = "Sept"' >> /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
|
||||
|
||||
sed -i 's/cbi.submit\"] = true/cbi.submit\"] = \"1\"/g' /usr/lib/lua/luci/dispatcher.lua
|
||||
|
||||
echo 'hsts=0' > /root/.wgetrc
|
||||
|
||||
rm -rf /tmp/luci-modulecache/
|
||||
rm -f /tmp/luci-indexcache
|
||||
|
||||
exit 0
|
||||
exit 0
|
|
@ -1,6 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
touch /etc/crontabs/root
|
||||
|
||||
uci set luci.main.lang=zh_cn
|
||||
#设置默认主题
|
||||
#uci set luci.main.mediaurlbase=/luci-static/bootstrap_mod
|
||||
uci commit luci
|
||||
|
||||
uci set system.@system[0].timezone=CST-8
|
||||
|
@ -10,62 +14,62 @@ 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/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#http://downloads.openwrt.org#https://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 '/lienol/d' /etc/opkg/distfeeds.conf
|
||||
#sed -i 's/downloads.openwrt.org/openwrt.proxy.ustclug.org/g' /etc/opkg/distfeeds.conf
|
||||
#sed -i 's/http/https/g' /etc/opkg/distfeeds.conf
|
||||
sed -i "s/# //g" /etc/opkg/distfeeds.conf
|
||||
sed -i '/openwrt_luci/ { s/snapshots/releases\/18.06.8/g; }' /etc/opkg/distfeeds.conf
|
||||
|
||||
#sed -i 's/root::0:0:99999:7:::/root:$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF.:0:0:99999:7:::/g' /etc/shadow
|
||||
|
||||
#uci set dhcp.lan.ra='server'
|
||||
#uci set dhcp.lan.dhcpv6='server'
|
||||
#uci set dhcp.lan.ra_management='1'
|
||||
#uci set dhcp.lan.ra_default='1'
|
||||
#uci set dhcp.@dnsmasq[0].localservice=0
|
||||
#uci set dhcp.@dnsmasq[0].nonwildcard=0
|
||||
#uci commit dhcp
|
||||
|
||||
#设置IP
|
||||
#uci set network.lan.ipaddr='192.168.119.10'
|
||||
#uci set network.lan.netmask='255.255.255.0'
|
||||
#uci commit network
|
||||
|
||||
#DNS重定向
|
||||
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 "# iptables -t nat -A PREROUTING -p udp --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
|
||||
|
||||
date1=`date +%h`
|
||||
sed -i '/DISTRIB_REVISION/d' /etc/openwrt_release
|
||||
echo "DISTRIB_REVISION='small'" >> /etc/openwrt_release
|
||||
sed -i '/DISTRIB_DESCRIPTION/d' /etc/openwrt_release
|
||||
echo "DISTRIB_DESCRIPTION='0penwrt '" >> /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 = "Sept"' >> /usr/lib/lua/luci/version.lua
|
||||
echo 'luciversion = "$date1"' >> /usr/lib/lua/luci/version.lua
|
||||
|
||||
# 删除状态页不需显示的
|
||||
rm -rf /usr/lib/lua/luci/view/admin_status/index
|
||||
#mv -f /usr/lib/lua/luci/view/admin_status/index /usr/lib/lua/luci/view/admin_status/index_backup 2>/dev/null
|
||||
|
||||
sed -i '/log-facility/d' /etc/dnsmasq.conf
|
||||
echo "log-facility=/dev/null" >> /etc/dnsmasq.conf
|
||||
#禁用某些可能会自启动且用不上的依赖包服务
|
||||
/etc/init.d/php7-fastcgi disable 2>/dev/null
|
||||
/etc/init.d/php7-fpm disable 2>/dev/null
|
||||
/etc/init.d/softethervpnbridge disable 2>/dev/null
|
||||
/etc/init.d/softethervpnserver disable 2>/dev/null
|
||||
/etc/init.d/softethervpnclient disable 2>/dev/null
|
||||
/etc/init.d/haproxy disable 2>/dev/null
|
||||
/etc/init.d/kcptun disable 2>/dev/null
|
||||
|
||||
sed -i 's/cbi.submit\"] = true/cbi.submit\"] = \"1\"/g' /usr/lib/lua/luci/dispatcher.lua
|
||||
|
||||
date=`date +%m.%d`
|
||||
sed -i "s/# REVISION:=x/REVISION:= $date/g" include/version.mk
|
||||
|
||||
echo 'hsts=0' > /root/.wgetrc
|
||||
|
||||
rm -rf /tmp/luci-modulecache/
|
||||
rm -f /tmp/luci-indexcache
|
||||
rm -rf /tmp/luci-*cache
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue