Improved IsRunning() process matching (#463)

This commit is contained in:
FlorentCoppint 2017-09-16 13:58:04 +02:00 committed by Michael Boelen
parent 79278c32ef
commit ccf9db18f8
1 changed files with 2 additions and 2 deletions

View File

@ -1245,8 +1245,8 @@
IsRunning() {
if [ $# -eq 0 ]; then ExitFatal "Missing parameter when calling IsRunning function"; fi
RUNNING=0
PSOPTIONS=""
if [ ${SHELL_IS_BUSYBOX} -eq 0 ]; then PSOPTIONS=" ax"; fi
PSOPTIONS=" -o args="
if [ ${SHELL_IS_BUSYBOX} -eq 0 ]; then PSOPTIONS=" -o args= -C $1"; fi
FIND=$(${PSBINARY} ${PSOPTIONS} | egrep "( |/)$1" | grep -v "grep")
if [ ! "${FIND}" = "" ]; then
RUNNING=1