gluon-mesh-vpn-tunneldigger: ignore default config when checking for legacy configs

This commit is contained in:
Cyrus Fox 2017-03-23 12:51:41 +01:00 committed by Matthias Schiffer
parent d3d1059149
commit aa17e3e86e
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -8,7 +8,9 @@ local uci = require('simple-uci').cursor()
local enabled = uci:get('tunneldigger', 'mesh_vpn', 'enabled')
if enabled == nil then
enabled = uci:get_first('tunneldigger', 'broker', 'enabled')
if uci:get_first('tunneldigger', 'broker', 'interface') == "mesh-vpn" then
enabled = uci:get_first('tunneldigger', 'broker', 'enabled')
end
end
if enabled == nil then
enabled = site.mesh_vpn.enabled or false