mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-16 21:22:56 +08:00
update 2026-05-27 19:55:46
This commit is contained in:
1 parent
762a95b5ae
commit
84f707b52b
758 files changed
-362299
No files matched your search
@@ -1,24 +0,0 @@
|
||||
module("luci.controller.nvr",package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/nvr") then
|
||||
return
|
||||
end
|
||||
|
||||
local page = entry({"admin", "services", "nvr"}, cbi("nvr"), _("NVR"),20)
|
||||
page.dependent = true
|
||||
entry({"admin", "services", "nvr", "status"}, call("nvr_status")).leaf = true
|
||||
end
|
||||
|
||||
function nvr_status()
|
||||
local nvrrecord = luci.sys.exec("ps -w | grep nvrrecord | grep -v grep | awk '{print$1}' 2>/dev/null ")
|
||||
local pushpid = luci.sys.exec("ps -w | grep 'f flv rtmp' | grep -v grep | awk '{print$1}' 2>/dev/null ")
|
||||
|
||||
local e = {
|
||||
nvrrecord = nvrrecord,
|
||||
pushpid = pushpid
|
||||
}
|
||||
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
Reference in new issue
Block a user