mirror of
https://github.com/Dichgrem/luci-app-nyn.git
synced 2025-12-16 13:42:00 -05:00
style:format
This commit is contained in:
@@ -7,17 +7,17 @@ function index()
|
||||
end
|
||||
|
||||
-- Menu
|
||||
entry({"admin", "network", "zzz"}, cbi("zzz"), "ZZZ", 60).dependent = false
|
||||
entry({ "admin", "network", "zzz" }, cbi("zzz"), "ZZZ", 60).dependent = false
|
||||
|
||||
-- Settings
|
||||
entry({"admin", "network", "zzz", "service_control"}, call("service_control")).leaf = true
|
||||
entry({ "admin", "network", "zzz", "service_control" }, call("service_control")).leaf = true
|
||||
|
||||
-- Status API
|
||||
entry({"admin", "network", "zzz", "get_status"}, call("act_status")).leaf = true
|
||||
entry({ "admin", "network", "zzz", "get_status" }, call("act_status")).leaf = true
|
||||
end
|
||||
|
||||
function service_control()
|
||||
local sys = require "luci.sys"
|
||||
local sys = require("luci.sys")
|
||||
local action = luci.http.formvalue("action")
|
||||
local result = { success = false, message = "" }
|
||||
|
||||
@@ -48,8 +48,8 @@ function service_control()
|
||||
end
|
||||
|
||||
function act_status()
|
||||
local sys = require "luci.sys"
|
||||
local util = require "luci.util"
|
||||
local sys = require("luci.sys")
|
||||
local util = require("luci.util")
|
||||
local status = {}
|
||||
|
||||
-- Get status
|
||||
@@ -59,7 +59,6 @@ function act_status()
|
||||
if status.running then
|
||||
status.process_info = util.trim(sys.exec("ps | grep -v grep | grep zzz"))
|
||||
end
|
||||
|
||||
-- Get log
|
||||
local log_file = "/tmp/zzz.log"
|
||||
if nixio.fs.access(log_file) then
|
||||
|
||||
Reference in New Issue
Block a user