policy-node.lua: apply policy settings live

Also change the setting names as per nomenclature.
This commit is contained in:
Ashok Sidipotu
2022-09-02 06:10:31 +05:30
committed by Julian Bouzas
parent d28d7d4278
commit 4dd8dd6ce5
6 changed files with 106 additions and 63 deletions

View File

@@ -14,6 +14,12 @@ local cutils = require ("common-utils")
local move = Settings.parse_boolean_safe ("default-policy-move", false)
function settingsChangedCallback (_, setting, _)
move = Settings.parse_boolean_safe ("policy.default.move", move)
end
Settings.subscribe ("policy.default.move", settingsChangedCallback)
function parseBool (var)
return cutils.parseBool (var)
end