immortalwrt/package/lean/luci-app-familycloud/luasrc/controller/familycloud.lua
2019-09-30 13:52:50 +08:00

24 lines
729 B
Lua

module("luci.controller.familycloud", package.seeall)
function index()
if not nixio.fs.access("/etc/config/familycloud") then
return
end
entry({"admin", "services", "familycloud"},firstchild(), _("天翼家庭云/云盘提速"), 80).dependent = false
entry({"admin", "services", "familycloud", "general"},cbi("familycloud"), _("Base Setting"), 1)
entry({"admin", "services", "familycloud", "log"},form("familycloudlog"), _("Log"), 2)
entry({"admin","services","familycloud","status"},call("act_status")).leaf=true
end
function act_status()
local e={}
e.running=luci.sys.call("ps | grep speedup.sh | grep -v grep >/dev/null")==0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end