4
Fork 0
This commit is contained in:
R3ABM Artem 2016-08-04 12:05:45 +04:00
parent 58afe56725
commit 1df172463e
2 changed files with 4 additions and 9 deletions

View file

@ -7,7 +7,6 @@ function index()
end
function restartCronosAgent()
luci.sys.init.stop("cronosagent")
luci.sys.init.start("cronosagent")
luci.sys.call("/etc/init.d/cronosagent restart")
luci.http.write("Done!")
end

View file

@ -1,9 +1,4 @@
local function handleAferCommit()
luci.sys.init.stop("cronosagent")
luci.sys.init.start("cronosagent")
end
local map = Map("cronosagent", "CronosAgent")
local section = map:section(TypedSection, "cronosagent", "Configuration")
@ -19,6 +14,7 @@ server.datatype = "host"
password.datatype = "string"
password.password = true
map.on_after_commit = handleAferCommit
function map.on_after_commit(self)
luci.sys.call("/etc/init.d/cronosagent restart")
end
return map