mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-29 02:15:13 +08:00
update 2026-10-07 11:52:44
This commit is contained in:
1 parent
d6cc6efa77
commit
617f7ca2a6
4898 files changed
-1713675
No files matched your search
@@ -1,24 +0,0 @@
|
||||
module("luci.controller.floatip", package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/floatip") then
|
||||
return
|
||||
end
|
||||
|
||||
entry({"admin", "services", "floatip"}, cbi("floatip"), _("FloatingGateway"), 20).dependent = true
|
||||
|
||||
entry({"admin", "services", "floatip_status"}, call("floatip_status"))
|
||||
end
|
||||
|
||||
function floatip_status()
|
||||
local sys = require "luci.sys"
|
||||
local uci = require "luci.model.uci".cursor()
|
||||
|
||||
local status = {
|
||||
running = not (sys.call("flock -sn /var/lock/floatip_loop.lock -c true >/dev/null") == 0),
|
||||
}
|
||||
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(status)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user