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,19 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
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
|
||||
set unbound.@unbound[-1].protocol="ip4_only"
|
||||
set unbound.@unbound[-1].enabled=1
|
||||
set unbound.@unbound[-1].recursion="aggressive"
|
||||
commit unbound
|
||||
EOF
|
||||
fi
|
||||
if [ "$(uci -q show dhcp | grep 127.0.0.1#5353)" = "" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
add_list dhcp.@dnsmasq[-1].server="127.0.0.1#5353"
|
||||
commit dhcp
|
||||
EOF
|
||||
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
|
||||
set unbound.@unbound[-1].protocol="ip4_only"
|
||||
set unbound.@unbound[-1].enabled=1
|
||||
set unbound.@unbound[-1].recursion="aggressive"
|
||||
commit unbound
|
||||
EOF
|
||||
fi
|
||||
if [ "$(uci -q show dhcp | grep 127.0.0.1#5353)" = "" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
add_list dhcp.@dnsmasq[-1].server="127.0.0.1#5353"
|
||||
commit dhcp
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set dhcp.@dnsmasq[-1].noresolv=1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue