mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 05:43:56 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
@@ -0,0 +1,25 @@
|
||||
-- Copyright 2018-2019 Lienol <lawlienol@gmail.com>
|
||||
module("luci.controller.pppoe-server", package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/pppoe-server") then return end
|
||||
|
||||
entry({"admin", "services", "pppoe-server"},
|
||||
alias("admin", "services", "pppoe-server", "settings"),
|
||||
_("PPPoE Server"), 3).acl_depends = { "luci-app-pppoe-server" }
|
||||
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