mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix disabling pihole when VPN is down
This commit is contained in:
parent
ef0040e56f
commit
6ac3d8c200
2 changed files with 15 additions and 15 deletions
|
@ -696,21 +696,6 @@ del_server_route6() {
|
|||
fi
|
||||
}
|
||||
|
||||
disable_pihole() {
|
||||
local server=$1
|
||||
if [ -n "$(uci -q get dhcp.@dnsmasq[0].server | grep '#53' | grep '10.255.25')" ]; then
|
||||
_log "Disable Pi-Hole..."
|
||||
uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.255.25')"
|
||||
if [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep '127.0.0.1#5353')" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
add_list dhcp.@dnsmasq[0].server='127.0.0.1#5353'
|
||||
commit dhcp
|
||||
EOF
|
||||
fi
|
||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
enable_pihole() {
|
||||
local server=$1
|
||||
nbserver=$((nbserver+1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue