#!/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 uci set system.@system[0].zonename=Asia/Shanghai uci commit system uci set fstab.@global[0].anon_mount=1 uci commit fstab ln -sf /sbin/ip /usr/bin/ip sed -i '/lienol/d' /etc/opkg/distfeeds.conf sed -i '/other/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 '/check_signature/d' /etc/opkg.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 #uci set network.lan.ipaddr='192.168.119.254' #uci set network.lan.netmask='255.255.255.0' uci set network.lan.ip6assign='64' 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 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 echo "DISTRIB_REVISION='v$(date +'%Y.%m.%d')'" >> /etc/openwrt_release sed -i '/DISTRIB_RELEASE/d' /etc/openwrt_release echo "DISTRIB_RELEASE='v$(date +'%Y.%m.%d')'" >> /etc/openwrt_release sed -i '/DISTRIB_DESCRIPTION/d' /etc/openwrt_release echo "DISTRIB_DESCRIPTION='Openwrt '" >> /etc/openwrt_release sed -i -e 's/ImmortalWrt/Openwrt/' -e 's/LuCI [^ ]*/kenzo/g' -e '/luciversion/d' /usr/lib/lua/luci/version.lua echo "luciversion ='$(date +'%m.%d')'" >> /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 #禁用某些可能会自启动且用不上的依赖包服务 /etc/init.d/php7-fastcgi disable 2>/dev/null /etc/init.d/php7-fpm disable 2>/dev/null /etc/init.d/php8-fastcgi disable 2>/dev/null /etc/init.d/php8-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 chmod 0755 /etc/init.d/* sed -i.bak '/^option overlay_root \/overlay/s/^/#/' /etc/opkg.conf sed -i.bak '/_smpackage/s#https://[^ ]*/packages/x86_64/smpackage#https://op.dllkids.xyz/packages/x86_64#g' /etc/opkg/distfeeds.conf rm -rf /tmp/luci-*cache exit 0