1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix disabling/enabling pi-hole

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-07-10 15:41:01 +02:00
parent f50c623bc7
commit a820ad2e9b
2 changed files with 11 additions and 8 deletions

View file

@ -4,10 +4,9 @@ START=10
disable_pihole() {
local server=$1
if [ "$(uci -q get openmptcprouter.${server}.pihole)" = "1" ] && [ "$(uci -q get dhcp.@dnsmasq[0].server)" != "127.0.0.1#5353" ]; then
if [ "$(uci -q get openmptcprouter.${server}.pihole)" != "1" ] && [ "$(uci -q get dhcp.@dnsmasq[0].server)" = "/lan/ /use-application-dns.net/" ]; then
_log "Disable Pi-Hole for boot..."
uci -q batch <<-EOF >/dev/null
delete dhcp.@dnsmasq[0].server
add_list dhcp.@dnsmasq[0].server='127.0.0.1#5353'
commit dhcp
EOF