1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 19:41:51 +00:00

Test resolution via unbound and restart if not working

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-05-03 11:20:57 +02:00
parent bea6b1ab53
commit c149ea35dc

View file

@ -38,10 +38,10 @@ if [ -f /etc/init.d/unbound ] && [ "$(uci -q get unbound.@unbound[0].enabled)" =
_log "Can't find unbound, restart it..."
/etc/init.d/unbound restart 2>&1 >/dev/null
sleep 5
# elif [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ] && [ "$(uci -q get unbound.ub_main.listen_port)" = "5353" ] && [ -n "$(dig +timeout=4 +tries=1 openmptcprouter.com -p 5353 | grep 'ANSWER: 0')" ]; then
# _log "Can't resolve via unbound, restart it..."
# /etc/init.d/unbound restart 2>&1 >/dev/null
# sleep 5
elif [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ] && [ "$(uci -q get unbound.ub_main.listen_port)" = "5353" ] && [ -n "$(dig +timeout=4 +tries=1 openmptcprouter.com -p 5353 | grep 'ANSWER: 0')" ]; then
_log "Can't resolve via unbound, restart it..."
/etc/init.d/unbound restart 2>&1 >/dev/null
sleep 5
fi
fi