mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Apply config again only for very old config or needed settings
This commit is contained in:
parent
5df9ee2856
commit
f895376029
6 changed files with 199 additions and 192 deletions
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
|
||||
NBCPU=$(grep -c '^processor' /proc/cpuinfo | tr -d "\n")
|
||||
if [ "$NBCPU" -gt 2 ]; then
|
||||
if [ "$(uci -q get shadowsocks-libev.hi3)" = "" ]; then
|
||||
|
@ -52,7 +53,7 @@ if [ "$(uci -q get shadowsocks-libev.hi.mode)" != "tcp" ]; then
|
|||
commit shadowsocks-libev
|
||||
EOF
|
||||
done
|
||||
|
||||
fi
|
||||
fi
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$(uci -q openmptcprouter.latest_versions)" = "" ]; then
|
||||
if [ "$(uci -q get unbound.@unbound[0].listen_port | grep 5353)" = "" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set unbound.@unbound[-1].listen_port=5353
|
||||
|
@ -15,6 +15,7 @@ if [ "$(uci -q show dhcp | grep 127.0.0.1#5353)" = "" ]; then
|
|||
commit dhcp
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set dhcp.@dnsmasq[-1].noresolv=1
|
||||
set dhcp.@dnsmasq[-1].nonegcache=1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$(uci -q openmptcprouter.latest_versions)" ]; then
|
||||
if [ "$(uci -q get qos.wan1)" = "" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete qos.wan
|
||||
|
@ -46,6 +46,7 @@ if [ "$(uci -q get qos.wan1)" = "" ]; then
|
|||
EOF
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm -f /tmp/luci-indexcache
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
|
||||
wanintf="$(uci -q get network.wan1.ifname)"
|
||||
if [ "$(uci -q get vnstat.@vnstat[-1].interface | grep $wanintf)" = "" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
|
@ -27,6 +27,7 @@ if [ "$(uci -q get vnstat.@vnstat[-1].interface | grep $wanintf)" = "" ]; then
|
|||
commit vnstat
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
rm -f /tmp/luci-indexcache
|
||||
echo '0 */2 * * * /etc/init.d/vnstat_backup backup' > /etc/crontabs/root
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$(uci -q openmptcprouter.latest_versions)" = "" ]; then
|
||||
uci -q show wireless.default_radio0 && {
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete wireless.default_radio0
|
||||
commit wireless
|
||||
EOF
|
||||
}
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$(uci -q openmptcprouter.latest_versions)" = "" ]; then
|
||||
if [ "$(uci -q get sqm.wan1)" = "" ]; then
|
||||
wan1="$(uci -q get network.wan1.ifname)"
|
||||
wan2="$(uci -q get network.wan2.ifname)"
|
||||
|
@ -64,6 +64,7 @@ if [ "$(uci -q get sqm.wan1)" = "" ]; then
|
|||
EOF
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm -f /tmp/luci-indexcache
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue