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:
parent
e2ff6a6ed3
commit
4e19df098a
@ -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