forked from luixiao0/Actions-OpenWrt-Nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault-settings
60 lines (45 loc) · 1.81 KB
/
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
#!/bin/sh
ln -sf /sbin/ip /usr/bin/ip
sed -i 's/snapshots\(.*luci\)/releases\/19.07-SNAPSHOT\1/g' /etc/opkg/distfeeds.conf
sed -i '/openwrt_custom/d' /etc/opkg/distfeeds.conf
sed -i '/openwrt_custom/d' /etc/opkg/customfeeds.conf
sed -i '$a src/gz openwrt_custom https://openwrt.supes.top:888/opkg' /etc/opkg/customfeeds.conf
sed -i 's/downloads.openwrt.org/mirrors.cloud.tencent.com\/openwrt/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 '/log-facility/d' /etc/dnsmasq.conf
echo "log-facility=/dev/null" >> /etc/dnsmasq.conf
sed -i '/profile.d/d' /lib/upgrade/keep.d/base-files
sed -i 's/\[ -e "$FILE" \] && . "$FILE"/[ -e "$FILE" ] \&\& env -i bash "$FILE"/g' /etc/profile
rm -rf /tmp/luci-*
uci set smartdns.@smartdns[0].ipv6_server='0'
uci commit smartdns
[ $(uci get dhcp.@dnsmasq[0].filter_aaaa 2>/dev/null) ] || {
uci set dhcp.@dnsmasq[0].filter_aaaa='1'
uci commit dhcp
}
if [ ! -f /etc/config/placeholder ]; then
uci set luci.main.lang=zh_cn
uci set luci.main.mediaurlbase=/luci-static/argon
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
sed -i 's/root:.*/root:$1$tTPCBw1t$ldzfp37h5lSpO9VXk4uUE\/:18336:0:99999:7:::/g' /etc/shadow
uci set network.lan.ipaddr="10.0.0.1"
uci set network.wan.proto=pppoe
uci commit network
uci set firewall.@defaults[0].fullcone='1'
uci commit firewall
uci set flowoffload.@flow[0].bbr='1'
uci commit flowoffload
fi
cp -R /www/cgi-bin/* /www/
find /www -type f -exec chmod 644 {} \;
find /www -type d -exec chmod 755 {} \;
chmod +x /www/luci
sed -i "s/git-.*-\(.*\)/git-\1/g" /usr/lib/lua/luci/version.lua
touch /etc/config/placeholder
exit 0