mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-26 20:22:51 +08:00
update 2026-09-24 10:46:53
This commit is contained in:
1 parent
907a158127
commit
b31a5c3878
4914 files changed
-1716179
No files matched your search
@@ -1,15 +0,0 @@
|
||||
module("luci.controller.lingti",package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/lingti") then return end
|
||||
|
||||
entry({"admin", "services", "lingti"}, cbi("lingti/lingti"), ("LingTi GameAcc"),99).dependent=true
|
||||
entry({"admin","services","lingti","status"},call("act_status")).leaf=true
|
||||
end
|
||||
|
||||
function act_status()
|
||||
local e={}
|
||||
e.running=luci.sys.call("pgrep -f lingti >/dev/null")==0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
@@ -1,20 +0,0 @@
|
||||
require("luci.util")
|
||||
|
||||
mp = Map("lingti", translate("LingTi Game Accelerator"))
|
||||
mp.description = translate("A Paid Game Acceleration service, Please use with Mobile App")
|
||||
mp:section(SimpleSection).template = "lingti/lingti_status"
|
||||
|
||||
s = mp:section(TypedSection, "lingti")
|
||||
s.anonymous=true
|
||||
s.addremove=false
|
||||
|
||||
o = s:option(Flag, "enabled", translate("Enable"))
|
||||
o.default = 0
|
||||
o.optional = false
|
||||
|
||||
local apply = luci.http.formvalue("cbi.apply")
|
||||
if apply then
|
||||
io.popen("/etc/init.d/lingti_luci start &")
|
||||
end
|
||||
|
||||
return mp
|
||||
@@ -1,21 +0,0 @@
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
XHR.poll(3, '<%=url([[admin]], [[services]], [[lingti]], [[status]])%>', null,
|
||||
function(x, data) {
|
||||
var tb = document.getElementById('lingti_status');
|
||||
if (data && tb) {
|
||||
if (data.running) {
|
||||
tb.innerHTML = '<em><b><font color=green>LingTi GameAcc <%:RUNNING%></font></b></em>';
|
||||
} else {
|
||||
tb.innerHTML = '<em><b><font color=red>LingTi GameAcc <%:NOT RUNNING%></font></b></em>';
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
//]]>
|
||||
</script>
|
||||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||
<fieldset class="cbi-section">
|
||||
<p id="lingti_status">
|
||||
<em><%:Collecting data...%></em>
|
||||
</p>
|
||||
</fieldset>
|
||||
Reference in new issue
Block a user