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

Fix openmptcprouter-api when no servers are reachable with dig

This commit is contained in:
Ycarus (Yannick Chabanois) 2025-02-13 16:33:45 +01:00
parent e94d8fa775
commit 7688139d38

View file

@ -814,7 +814,7 @@ function interfaces_status()
local timeout = uci:get("openmptcprouter","settings","status_getip_timeout") or "1"
local dns_test = ""
if uci:get("openmptcprouter","settings","external_check") ~= "0" then
dns_test = sys.exec("dig +timeout=" .. timeout .. " +tries=1 openmptcprouter.com | grep 'ANSWER: 0'")
dns_test = sys.exec("dig +timeout=" .. timeout .. " +tries=1 openmptcprouter.com | grep -e 'ANSWER: 0' -e 'no servers could be reached'")
end
if dns_test == "" then
mArray.openmptcprouter["dns"] = true