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 df2d79a159
commit 9355dd4546
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ LUCI_TITLE:=LuCI for SSR Server Python
LUCI_DEPENDS:=+python3
LUCI_PKGARCH:=all
PKG_VERSION:=3.2.0
PKG_RELEASE:=6
PKG_RELEASE:=7
include $(TOPDIR)/feeds/luci/luci.mk

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