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

Only check whois when we have an IP

This commit is contained in:
Ycarus 2018-07-24 19:42:44 +02:00
parent c3f51af9a2
commit 6b4e5d99bd

View file

@ -665,7 +665,10 @@ function interfaces_status()
end
local publicIP = ut.trim(sys.exec("omr-ip-intf " .. ifname))
local whois = ut.trim(sys.exec("whois " .. publicIP .. " | grep -i 'netname' | awk '{print $2}'"))
local whois = ""
if publicIP ~= "" then
whois = ut.trim(sys.exec("whois " .. publicIP .. " | grep -i 'netname' | awk '{print $2}'"))
end
local data = {
label = section['label'] or interface,