From 3124a04ce9ace5a9bc650a70aac940b3bcacac9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Wed, 21 Oct 2020 11:27:44 +0200 Subject: [PATCH] require pgrep before usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- include/functions | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/functions b/include/functions index 8cd95aec..6964da20 100644 --- a/include/functions +++ b/include/functions @@ -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