mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Check DNS only if external tests are not disabled
This commit is contained in:
parent
7139a5db51
commit
e41723e295
1 changed files with 4 additions and 1 deletions
|
@ -789,7 +789,10 @@ function interfaces_status()
|
||||||
-- dns
|
-- dns
|
||||||
mArray.openmptcprouter["dns"] = false
|
mArray.openmptcprouter["dns"] = false
|
||||||
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 = sys.exec("dig +timeout=" .. timeout .. " +tries=1 openmptcprouter.com | grep 'ANSWER: 0'")
|
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'")
|
||||||
|
end
|
||||||
if dns_test == "" then
|
if dns_test == "" then
|
||||||
mArray.openmptcprouter["dns"] = true
|
mArray.openmptcprouter["dns"] = true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue