gluon/package/gluon-p2p-vpn-fastd/files/lib/gluon/upgrade/420-p2p-vpn-fastd-add-group
2015-05-17 15:20:29 +02:00

19 lines
278 B
Plaintext

#!/usr/bin/lua
local uci = require('luci.model.uci').cursor()
local e = uci:get('fastd', 'mesh_vpn', 'enabled')
if not e then
e = '0'
end
uci:section('fastd', 'peer_group', 'p2p_vpn',
{
enabled = e,
net = 'mesh_vpn',
}
)
uci:save('fastd')
uci:commit('fastd')