mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
18 lines
505 B
Lua
18 lines
505 B
Lua
module("luci.controller.mia",package.seeall)
|
|
|
|
function index()
|
|
if not nixio.fs.access("/etc/config/mia") then
|
|
return
|
|
end
|
|
|
|
entry({"admin", "services", "mia"}, cbi("mia"), _("Internet Access Schedule Control"), 30).dependent = true
|
|
entry({"admin", "services", "mia", "status"}, call("act_status")).leaf = true
|
|
end
|
|
|
|
function act_status()
|
|
local e = {}
|
|
e.running = luci.sys.call("iptables -L INPUT |grep MIA >/dev/null") == 0
|
|
luci.http.prepare_content("application/json")
|
|
luci.http.write_json(e)
|
|
end
|