Browse Source

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

Cyrus Fox 7 years ago
parent
commit
aa17e3e86e

+ 3 - 1
package/gluon-mesh-vpn-tunneldigger/luasrc/lib/gluon/upgrade/400-mesh-vpn-tunneldigger

@@ -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