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: 0e285c3037 ("add lean's package")
Fixes: #250
This commit is contained in:
CN_SZTL 2021-01-08 17:43:12 +08:00
parent 3de273b260
commit 070b8b64fc
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -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