require pgrep before usage

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2020-10-21 11:27:44 +02:00
parent 92df49d08e
commit 3124a04ce9
1 changed files with 1 additions and 2 deletions

View File

@ -1547,8 +1547,7 @@
if [ -z "${search}" ]; then ExitFatal "Missing process to search for when using IsRunning function"; fi
RUNNING=0
# AIX does not fully support pgrep options, so using ps instead
if [ "${OS}" != "AIX" ]; then
if [ -x "${PGREPBINARY}" ] && [ "${OS}" != "AIX" ]; then
# When --user is used, perform a search using the -u option
# Initialize users for strict mode
if [ -n "${users:-}" ]; then