6 print("Usage: " .. arg[0] .. " [options]")
8 print(" -a: apply the config changes")
9 print(" -t: show matching UCI triggers")
10 print(" -s: show information about tasks to be executed")
11 print(" -r: reset all triggers")
15 if arg[1] == "-s" then
16 local triggers = uci.trigger.get_active()
19 for i, a in ipairs(triggers) do
22 print(" - " .. uci.trigger.get_description(trigger, sections))
27 elseif arg[1] == "-t" then
28 local triggers = uci.trigger.get_active()
29 for i, a in ipairs(triggers) do
32 if trigger.section_only then
33 print(trigger.id .. " " .. table.concat(" ", sections))
38 elseif arg[1] == "-a" then
40 elseif arg[1] == "-r" then
41 uci.trigger.reset_state()