@@ -7,18 +7,18 @@ function index()
7
7
end
8
8
9
9
entry ({" admin" , " services" , " serverchand" }, alias (" admin" , " services" , " serverchand" , " setting" ),_ (" 钉钉推送" ), 30 ).dependent = true
10
- entry ({" admin" ," services" ," serverchand" ," status" },call (" act_status" )).leaf = true
11
10
entry ({" admin" , " services" , " serverchand" , " setting" }, cbi (" serverchand/setting" ),_ (" 配置" ), 40 ).leaf = true
12
11
entry ({" admin" , " services" , " serverchand" , " advanced" }, cbi (" serverchand/advanced" ),_ (" 高级设置" ), 50 ).leaf = true
13
12
entry ({" admin" , " services" , " serverchand" , " client" }, form (" serverchand/client" ), " 在线设备" , 80 )
14
13
entry ({" admin" , " services" , " serverchand" , " log" }, form (" serverchand/log" ),_ (" 日志" ), 99 ).leaf = true
15
14
entry ({" admin" , " services" , " serverchand" , " get_log" }, call (" get_log" )).leaf = true
16
15
entry ({" admin" , " services" , " serverchand" , " clear_log" }, call (" clear_log" )).leaf = true
16
+ entry ({" admin" , " services" , " serverchand" , " status" }, call (" act_status" )).leaf = true
17
17
end
18
18
19
19
function act_status ()
20
20
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
22
22
luci .http .prepare_content (" application/json" )
23
23
luci .http .write_json (e )
24
24
end
0 commit comments