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

Change check for dnsmasq state in omr schedule

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-06-24 15:43:41 +02:00
parent bf9a0a4e21
commit e8869d75c1

View file

@ -33,7 +33,7 @@ if [ -f /etc/init.d/dnsmasq ]; then
_log "Can't find dnsmasq, restart it..."
/etc/init.d/dnsmasq restart 2>&1 >/dev/null
sleep 5
elif [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ] && [ -n "$(dig +timeout=4 +tries=1 openmptcprouter.com | grep 'connection refused')" ]; then
elif [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ] && [ -n "$(dig +timeout=4 +tries=1 openmptcprouter.com 2>&1 | grep -i 'connection refused')" ]; then
_log "Can't resolve via dnsmasq, restart it..."
/etc/init.d/dnsmasq restart 2>&1 >/dev/null
sleep 5