mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-05 18:44:06 +08:00
update 2026-05-12 22:20:49
This commit is contained in:
1 parent
33be405a88
commit
1b6001bfed
1854 files changed
+96
-749039
No files matched your search
@@ -1,19 +0,0 @@
|
||||
-- Copyright 2018-2021 Lienol <lawlienol@gmail.com>
|
||||
module("luci.controller.pppoe-server", package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/luci-app-pppoe-server") then return end
|
||||
|
||||
entry({"admin", "services", "pppoe-server"}, alias("admin", "services", "pppoe-server", "settings"), _("PPPoE Server"), 3)
|
||||
entry({"admin", "services", "pppoe-server", "settings"}, cbi("pppoe-server/settings"), _("General Settings"), 10).leaf = true
|
||||
entry({"admin", "services", "pppoe-server", "users"}, cbi("pppoe-server/users"), _("Users Manager"), 20).leaf = true
|
||||
entry({"admin", "services", "pppoe-server", "online"}, cbi("pppoe-server/online"), _("Online Users"), 30).leaf = true
|
||||
entry({"admin", "services", "pppoe-server", "status"}, call("status")).leaf = true
|
||||
end
|
||||
|
||||
function status()
|
||||
local e = {}
|
||||
e.status = luci.sys.call("pidof %s >/dev/null" % "pppoe-server") == 0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
Reference in new issue
Block a user