forked from jcjyxjs/Actions-OpenWrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzzz-default-settings
75 lines (59 loc) · 2.64 KB
/
zzz-default-settings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/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 '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 '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
#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
date=`date +%m.%d.%Y`
date1=`date +%h`
sed -i '/DISTRIB_REVISION/d' /etc/openwrt_release
echo "DISTRIB_REVISION='v$date'" >> /etc/openwrt_release
sed -i '/DISTRIB_RELEASE/d' /etc/openwrt_release
echo "DISTRIB_RELEASE='v$date1'" >> /etc/openwrt_release
sed -i '/DISTRIB_DESCRIPTION/d' /etc/openwrt_release
echo "DISTRIB_DESCRIPTION='Openwrt '" >> /etc/openwrt_release
sed -i 's/LuCI Master/Jala/g' /usr/lib/lua/luci/version.lua
sed -i 's/LuCI openwrt-18.06 branch/Jala/g' /usr/lib/lua/luci/version.lua
sed -i 's/LuCI openwrt-18.06-k5.4 branch/Jala/g' /usr/lib/lua/luci/version.lua
sed -i 's/LuCI 17.01 Lienol/Jala/g' /usr/lib/lua/luci/version.lua
sed -i 's/LuCI openwrt-21.02 branch/Jala/g' /usr/lib/lua/luci/version.lua
sed -i '/luciversion/d' /usr/lib/lua/luci/version.lua
echo 'luciversion = "v$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
#禁用某些可能会自启动且用不上的依赖包服务
/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
/etc/init.d/adguardhome disable 2>/dev/null
rm -rf /tmp/luci-*cache
exit 0