simplify code of fastd_config enabled and fastd_syslog_level
This commit is contained in:
parent
1184553ebd
commit
b06dea87ec
@ -15,17 +15,9 @@ users.remove_user('gluon-fastd')
|
||||
users.add_group('gluon-fastd', 800)
|
||||
|
||||
|
||||
local enabled = uci:get('fastd', 'mesh_vpn', 'enabled')
|
||||
if not enabled then
|
||||
enabled = site.fastd_mesh_vpn.enabled and 1 or 0
|
||||
end
|
||||
|
||||
|
||||
local syslog_level = uci:get('fastd', 'mesh_vpn', 'syslog_level')
|
||||
if not syslog_level then
|
||||
syslog_level = 'verbose'
|
||||
end
|
||||
local enabled = uci:get('fastd', 'mesh_vpn', 'enabled') and 1 or 0
|
||||
|
||||
local syslog_level = uci:get('fastd', 'mesh_vpn', 'syslog_level') or 'verbose'
|
||||
|
||||
local methods
|
||||
|
||||
@ -37,7 +29,6 @@ if site.fastd_mesh_vpn.configurable then
|
||||
has_null = lutil.contains(old_methods, 'null')
|
||||
end
|
||||
|
||||
|
||||
methods = {}
|
||||
if has_null then
|
||||
table.insert(methods, 'null')
|
||||
|
Loading…
Reference in New Issue
Block a user