update 2026-05-10 09:48:30

This commit is contained in:
action committed 2026-05-10 09:48:30 +08:00
1 parent 95ac96413e
commit 0b362674f1
6244 files changed
+2992248

No files matched your search

@@ -0,0 +1,21 @@
-- Copyright 2018-2020 Lienol <lawlienol@gmail.com>
module("luci.controller.pptpd", package.seeall)
function index()
if not nixio.fs.access("/etc/config/luci-app-pptp-server") then return end
entry({"admin", "vpn"}, firstchild(), "VPN", 45).dependent = false
entry({"admin", "vpn", "pptpd"}, alias("admin", "vpn", "pptpd", "settings"), _("PPTP VPN Server"), 48)
entry({"admin", "vpn", "pptpd", "settings"}, cbi("pptpd/settings"), _("General Settings"), 10).leaf = true
entry({"admin", "vpn", "pptpd", "users"}, cbi("pptpd/users"), _("Users Manager"), 20).leaf = true
entry({"admin", "vpn", "pptpd", "user"}, cbi("pptpd/user")).leaf = true
entry({"admin", "vpn", "pptpd", "online"}, cbi("pptpd/online"), _("Online Users"), 30).leaf = true
entry({"admin", "vpn", "pptpd", "status"}, call("status")).leaf = true
end
function status()
local e = {}
e.status = luci.sys.call("pidof %s >/dev/null" % "pptpd") == 0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end