diff options
Diffstat (limited to 'applications/luci-app-nlbwmon/luasrc/controller')
-rw-r--r-- | applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua b/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua index 4f41bb8c31..bb56bc6e6e 100644 --- a/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua +++ b/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua @@ -13,6 +13,7 @@ function index() entry({"admin", "nlbw", "ptr"}, call("action_ptr"), nil, 6).leaf = true entry({"admin", "nlbw", "download"}, call("action_download"), nil, 7) entry({"admin", "nlbw", "restore"}, post("action_restore"), nil, 8) + entry({"admin", "nlbw", "commit"}, call("action_commit"), nil, 9) end local function exec(cmd, args, writer) @@ -214,3 +215,11 @@ function action_restore() table.concat(output, ", ")) }) end + +function action_commit() + local http = require "luci.http" + local disp = require "luci.dispatcher" + + http.redirect(disp.build_url("admin/nlbw/display")) + exec("/usr/sbin/nlbw", { "-c", "commit" }) +end |