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:
parent
e94d8fa775
commit
7688139d38
1 changed files with 1 additions and 1 deletions
|
@ -814,7 +814,7 @@ function interfaces_status()
|
||||||
local timeout = uci:get("openmptcprouter","settings","status_getip_timeout") or "1"
|
local timeout = uci:get("openmptcprouter","settings","status_getip_timeout") or "1"
|
||||||
local dns_test = ""
|
local dns_test = ""
|
||||||
if uci:get("openmptcprouter","settings","external_check") ~= "0" then
|
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
|
end
|
||||||
if dns_test == "" then
|
if dns_test == "" then
|
||||||
mArray.openmptcprouter["dns"] = true
|
mArray.openmptcprouter["dns"] = true
|
||||||
|
|
Loading…
Reference in a new issue