Merge pull request #72 from freifunk-gluon/fastd-site-enable

mesh-vpn-fastd: enable from site.conf
This commit is contained in:
Nils Schneider 2014-09-06 13:38:43 +02:00
commit 29464a4ba1
2 changed files with 15 additions and 0 deletions

View File

@ -11,3 +11,4 @@ local function check_peer(k, _)
end
need_table('fastd_mesh_vpn.backbone.peers', check_peer)
need_boolean('fastd_mesh_vpn.enabled', false)

View File

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