mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-02 08:13:56 +08:00
update 2026-09-26 17:00:06
This commit is contained in:
1 parent
97ae9f68da
commit
bcc9ceb04a
4756 files changed
+1670713
No files matched your search
@@ -0,0 +1,19 @@
|
||||
-- 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