Use ps instead of pgrep on AIX

This commit is contained in:
Michael Boelen 2019-04-07 19:03:21 +02:00
parent 1a1d736fa7
commit 08ecd91180
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 2 additions and 1 deletions

View File

@ -1284,7 +1284,8 @@
if [ -z "${search}" ]; then ExitFatal "Missing process to search for when using IsRunning function"; fi if [ -z "${search}" ]; then ExitFatal "Missing process to search for when using IsRunning function"; fi
RUNNING=0 RUNNING=0
if [ ! -z "${PGREPBINARY}" ]; then # AIX does not fully support pgrep options, so using ps instead
if [ ! -z "${PGREPBINARY}" -a ! "${OS}" = "AIX" ]; then
FIND=$(${PGREPBINARY} ${pgrep_options} "${search}" | ${TRBINARY} '\n' ' ') FIND=$(${PGREPBINARY} ${pgrep_options} "${search}" | ${TRBINARY} '\n' ' ')
else else
if [ -z "${PSOPTIONS}" ]; then if [ -z "${PSOPTIONS}" ]; then