mesh-vpn-fastd: enable from site.conf

This patch allows fastd's enabled flag's default value to be set from
site.conf.
This commit is contained in:
Nils Schneider 2014-09-03 20:37:17 +02:00
parent e4fc1955cc
commit 31976c242d
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')