Add luci.lucid.running()
This commit is contained in:
parent
17e7f67a7c
commit
45cf10a665
1 changed files with 6 additions and 0 deletions
|
@ -60,6 +60,12 @@ function start()
|
|||
run()
|
||||
end
|
||||
|
||||
--- Returns the PID of the currently active LuCId process.
|
||||
function running()
|
||||
local pid = tonumber(state:get(UCINAME, "main", "pid"))
|
||||
return pid and nixio.kill(pid, 0) and pid
|
||||
end
|
||||
|
||||
--- Stops any running LuCId superprocess.
|
||||
function stop()
|
||||
local pid = tonumber(state:get(UCINAME, "main", "pid"))
|
||||
|
|
Loading…
Reference in a new issue