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

Check DNS only if external tests are not disabled

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-12-13 10:57:47 +01:00
parent 7139a5db51
commit e41723e295

View file

@ -789,7 +789,10 @@ function interfaces_status()
-- dns
mArray.openmptcprouter["dns"] = false
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
mArray.openmptcprouter["dns"] = true
end