luci-app-ssrserver-python: improve status check (#6167)

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")
This commit is contained in:
CN_SZTL 2021-01-08 23:11:45 +08:00 committed by GitHub
parent e7115414c8
commit 9a742cfb4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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