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:
parent
c3f51af9a2
commit
6b4e5d99bd
1 changed files with 4 additions and 1 deletions
|
@ -665,7 +665,10 @@ function interfaces_status()
|
||||||
end
|
end
|
||||||
|
|
||||||
local publicIP = ut.trim(sys.exec("omr-ip-intf " .. ifname))
|
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 = {
|
local data = {
|
||||||
label = section['label'] or interface,
|
label = section['label'] or interface,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue