Tunneldigger-Watchdog: Refractoring function has_mesh_vpn_neighbours()
This commit is contained in:
parent
f206b7c79f
commit
31335089a2
@ -17,12 +17,13 @@ end
|
||||
|
||||
function has_mesh_vpn_neighbours()
|
||||
local handle = io.popen('batctl o', 'r')
|
||||
if handle then
|
||||
for line in handle:lines() do
|
||||
if line:find('mesh%-vpn') then
|
||||
handle:close()
|
||||
return true
|
||||
end
|
||||
if not handle then
|
||||
return false
|
||||
end
|
||||
for line in handle:lines() do
|
||||
if line:find('mesh%-vpn') then
|
||||
handle:close()
|
||||
return true
|
||||
end
|
||||
end
|
||||
handle:close()
|
||||
|
Loading…
Reference in New Issue
Block a user