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()
|
function has_mesh_vpn_neighbours()
|
||||||
local handle = io.popen('batctl o', 'r')
|
local handle = io.popen('batctl o', 'r')
|
||||||
if handle then
|
if not handle then
|
||||||
for line in handle:lines() do
|
return false
|
||||||
if line:find('mesh%-vpn') then
|
end
|
||||||
handle:close()
|
for line in handle:lines() do
|
||||||
return true
|
if line:find('mesh%-vpn') then
|
||||||
end
|
handle:close()
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
handle:close()
|
handle:close()
|
||||||
|
Loading…
Reference in New Issue
Block a user