mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-11 05:57:51 +08:00
🎨 Sync 2026-06-07 18:17:40
This commit is contained in:
1 parent
31e511aff8
commit
71aabc1bca
307 files changed
+14316
-109882
No files matched your search
@@ -1,8 +1,11 @@
|
||||
|
||||
module("luci.controller.gecoosac", package.seeall)
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local sys = require "luci.sys"
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/gecoosac") then
|
||||
if not fs.access("/etc/config/gecoosac") then
|
||||
return
|
||||
end
|
||||
local page
|
||||
@@ -13,17 +16,9 @@ function index()
|
||||
end
|
||||
|
||||
function act_status()
|
||||
local e = {}
|
||||
local binpath = "/usr/bin/gecoosac"
|
||||
e = {
|
||||
running = luci.sys.call("pgrep " .. binpath .. " >/dev/null") == 0
|
||||
local e = {
|
||||
running = sys.call("/etc/init.d/gecoosac status >/dev/null 2>&1") == 0
|
||||
}
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
||||
function clear_upload()
|
||||
local path = "/tmp/gecoosac/upload/"
|
||||
luci.sys.call("rm -rf " .. path .. "/*")
|
||||
luci.http.status(200, "OK")
|
||||
end
|
||||
Reference in new issue
Block a user