Merge pull request #72 from freifunk-gluon/fastd-site-enable
mesh-vpn-fastd: enable from site.conf
This commit is contained in:
commit
29464a4ba1
@ -11,3 +11,4 @@ local function check_peer(k, _)
|
|||||||
end
|
end
|
||||||
|
|
||||||
need_table('fastd_mesh_vpn.backbone.peers', check_peer)
|
need_table('fastd_mesh_vpn.backbone.peers', check_peer)
|
||||||
|
need_boolean('fastd_mesh_vpn.enabled', false)
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/lua
|
||||||
|
|
||||||
|
local site = require 'gluon.site_config'
|
||||||
|
local uci = require 'luci.model.uci'
|
||||||
|
local c = uci.cursor()
|
||||||
|
|
||||||
|
c:section('fastd', 'fastd', 'mesh_vpn',
|
||||||
|
{
|
||||||
|
enabled = site.fastd_mesh_vpn.enabled and 1 or 0
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
c:save('fastd')
|
||||||
|
c:commit('fastd')
|
Loading…
Reference in New Issue
Block a user