gluon-mesh-vpn-core: staticaly return 'mesh-vpn' and change lib name
This commit is contained in:
parent
228cdef358
commit
5f8ba24fa7
@ -0,0 +1,7 @@
|
||||
local M = {}
|
||||
|
||||
function M.get_mesh_vpn_interface()
|
||||
return 'mesh-vpn'
|
||||
end
|
||||
|
||||
return M
|
@ -1,24 +0,0 @@
|
||||
local uci = require('simple-uci').cursor()
|
||||
local unistd = require 'posix.unistd'
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.get_mesh_vpn_interface()
|
||||
local ret = {}
|
||||
if unistd.access('/lib/gluon/mesh-vpn/fastd') then
|
||||
local vpnifac = uci:get('fastd', 'mesh_vpn_backbone', 'net')
|
||||
if vpnifac ~= nil then
|
||||
vpnifac = vpnifac:gsub("%_",'-')
|
||||
table.insert(ret,vpnifac)
|
||||
end
|
||||
end
|
||||
if unistd.access('/lib/gluon/mesh-vpn/tunneldigger') then
|
||||
local vpnifac = uci:get('tunneldigger', 'mesh_vpn', 'interface')
|
||||
if vpnifac ~= nil then
|
||||
table.insert(ret,vpnifac)
|
||||
end
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
return M
|
Loading…
Reference in New Issue
Block a user