gluon-mesh-vpn-fastd: fix empty string key
Co-Authored-By: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
parent
08a8ef0bcd
commit
78ca654c5c
@ -7,7 +7,13 @@ local vpn_core = require 'gluon.mesh-vpn'
|
||||
local M = {}
|
||||
|
||||
function M.public_key()
|
||||
return util.trim(util.exec('/etc/init.d/fastd show_key mesh_vpn'))
|
||||
local key = util.trim(util.exec('/etc/init.d/fastd show_key mesh_vpn'))
|
||||
|
||||
if key == '' then
|
||||
key = nil
|
||||
end
|
||||
|
||||
return key
|
||||
end
|
||||
|
||||
function M.enable(val)
|
||||
|
Loading…
Reference in New Issue
Block a user