Skip to content

Commit 64e3bc5

Browse files
authored
Update serverchand.lua
添加 微信推送测试版接口 添加 无名称设备使用 MAC 查找设备厂商名称 更改 部分说明文字 更改 部分文本格式,兼容微信推送测试版接口 修复 设备别名 优先级过低,修改后不能即时生效的问题 修复 中文名称的设备可能造成推送失败的问题 添加 微信推送测试版接口 添加 无名称设备使用 MAC 查找设备厂商名称 更改 部分说明文字 更改 部分文本格式,兼容微信推送测试版接口 修复 部分主题中插件运行状态显示错误的问题 更改运行状态获取命令 添加 设备异常流量警报功能 替换一个低版本的 sh 不支持的语法 修复设备上线后流量未重置的问题 上线提示中添加设备接口 忽略 169.254.0.0/16 临时地址 修改 字符长度计算和显示的代码
1 parent 09091be commit 64e3bc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

luasrc/controller/serverchand.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ function index()
77
end
88

99
entry({"admin", "services", "serverchand"}, alias("admin", "services", "serverchand", "setting"),_("钉钉推送"), 30).dependent = true
10-
entry({"admin","services","serverchand","status"},call("act_status")).leaf=true
1110
entry({"admin", "services", "serverchand", "setting"}, cbi("serverchand/setting"),_("配置"), 40).leaf = true
1211
entry({"admin", "services", "serverchand", "advanced"}, cbi("serverchand/advanced"),_("高级设置"), 50).leaf = true
1312
entry({"admin", "services", "serverchand", "client"}, form("serverchand/client"), "在线设备", 80)
1413
entry({"admin", "services", "serverchand", "log"}, form("serverchand/log"),_("日志"), 99).leaf = true
1514
entry({"admin", "services", "serverchand", "get_log"}, call("get_log")).leaf = true
1615
entry({"admin", "services", "serverchand", "clear_log"}, call("clear_log")).leaf = true
16+
entry({"admin", "services", "serverchand", "status"}, call("act_status")).leaf = true
1717
end
1818

1919
function act_status()
2020
local e={}
21-
e.running=luci.sys.call("pgrep -f serverchand/serverchand >/dev/null")==0
21+
e.running=luci.sys.call("ps|grep -v grep|grep -c serverchand >/dev/null")==0
2222
luci.http.prepare_content("application/json")
2323
luci.http.write_json(e)
2424
end

0 commit comments

Comments
 (0)