Changles in LuCI
This commit is contained in:
parent
edabcb60cc
commit
185501b7fa
4 changed files with 21 additions and 10 deletions
|
@ -3,10 +3,5 @@ module("luci.controller.cronosagent", package.seeall)
|
|||
function index()
|
||||
entry({ "admin", "cronosagent" }, alias("admin", "cronosagent", "configure", "restart"), "CronosAgent")
|
||||
entry({ "admin", "cronosagent", "configure" }, cbi("cronosagent/configure"), "Configure", 10)
|
||||
entry({ "admin", "cronosagent", "restart" }, call("restartCronosAgent"), "Restart", 20)
|
||||
end
|
||||
|
||||
function restartCronosAgent()
|
||||
luci.sys.call("/etc/init.d/cronosagent restart")
|
||||
luci.http.write("Done!")
|
||||
entry({ "admin", "cronosagent", "restart" }, template("cronosagent/restart"), "Restart", 20)
|
||||
end
|
||||
|
|
9
OpenWRT/view/cronosagent/restart.htm
Normal file
9
OpenWRT/view/cronosagent/restart.htm
Normal file
|
@ -0,0 +1,9 @@
|
|||
<%
|
||||
|
||||
luci.sys.call("/etc/init.d/cronosagent restart ; sleep 2")
|
||||
|
||||
%>
|
||||
<%+header%>
|
||||
<h2 name="content">CronosAgent</h2>
|
||||
<textarea readonly="readonly" wrap="off" rows="20"><%= luci.util.exec("logread | grep CronoSAgent") %></textarea>
|
||||
<%+footer%>
|
Loading…
Add table
Add a link
Reference in a new issue