From 070b8b64fc5e7d56a48825f65669c07a432beaf0 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Fri, 8 Jan 2021 17:43:12 +0800 Subject: [PATCH] luci-app-ssrserver-python: improve status check Running `ps` via luci.exec directly will cause no output to compare as `ps` cannot detect the size of screen, adding `-w` to solve this. Fixes: 0e285c3037c3481d0c1b7a7c672a6ca5692ef35f ("add lean's package") Fixes: #250 --- .../lean/luci-app-ssrserver-python/luasrc/controller/ssrs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/lean/luci-app-ssrserver-python/luasrc/controller/ssrs.lua b/package/lean/luci-app-ssrserver-python/luasrc/controller/ssrs.lua index 01095ec597..281b85de9c 100644 --- a/package/lean/luci-app-ssrserver-python/luasrc/controller/ssrs.lua +++ b/package/lean/luci-app-ssrserver-python/luasrc/controller/ssrs.lua @@ -15,7 +15,7 @@ end function act_status() local e={} - e.running=luci.sys.call("ps | grep server.py |grep -v grep >/dev/null") == 0 + e.running=luci.sys.call("ps -w | grep ssrs.json |grep -v grep >/dev/null") == 0 luci.http.prepare_content("application/json") luci.http.write_json(e) end