1
0
mirror of https://github.com/kenzok8/small-package synced 2025-09-20 19:11:30 +08:00
Files
small-package/luci-app-UUGameAcc/luasrc/controller/uuplugin.lua
github-actions[bot] 7be2b15d1a update-09.05
2021-09-05 16:50:22 +08:00

16 lines
492 B
Lua

module("luci.controller.uuplugin",package.seeall)
function index()
if not nixio.fs.access("/etc/config/uuplugin") then return end
entry({"admin", "services", "uuplugin"}, cbi("uuplugin/uuplugin"), ("UU GameAcc"),99).dependent=true
entry({"admin","services","uuplugin","status"},call("act_status")).leaf=true
end
function act_status()
local e={}
e.running=luci.sys.call("pgrep -f uuplugin >/dev/null")==0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end