luci-app-unblockmusic: compatible with proc-ng-ps

This commit is contained in:
LEAN-ESX 2019-10-13 22:38:15 -07:00
parent 072ed9f80c
commit f9df6c9eb3
3 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-unblockmusic
PKG_VERSION:=2.2.0
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_LICENSE:=Apache-2.0

View File

@ -16,7 +16,7 @@ end
function act_status()
local e={}
e.running=luci.sys.call("ps | grep app.js | grep -v grep >/dev/null")==0
e.running=luci.sys.call("busybox ps -w | grep app.js | grep -v grep >/dev/null")==0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -69,9 +69,9 @@ start()
stop()
{
kill -9 $(ps | grep monitor | grep -v grep | awk '{print $1}') >/dev/null 2>&1
kill -9 $(ps | grep app.js | grep -v grep | awk '{print $1}') >/dev/null 2>&1
kill -9 $(ps | grep logcheck.sh | grep -v grep | awk '{print $1}') >/dev/null 2>&1
kill -9 $(busybox ps -w | grep monitor | grep -v grep | awk '{print $1}') >/dev/null 2>&1
kill -9 $(busybox ps -w | grep app.js | grep -v grep | awk '{print $1}') >/dev/null 2>&1
kill -9 $(busybox ps -w | grep logcheck.sh | grep -v grep | awk '{print $1}') >/dev/null 2>&1
rm -f /tmp/unblockmusic.log
del_rule