From 17c435801d4f457b748228ac49f99ff8a144259d Mon Sep 17 00:00:00 2001 From: mboelen Date: Sat, 2 Apr 2016 17:18:19 +0200 Subject: [PATCH] Added return values to IsRunning function --- include/functions | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/functions b/include/functions index 7cbe476d..e45e5ae8 100644 --- a/include/functions +++ b/include/functions @@ -689,8 +689,13 @@ LogText "Action: Performing plugin tests" } - # Is a process running? - # Returns: RUNNING + ################################################################################ + # Name : IsRunning() + # Description : Check if a process is running + # Returns : 0 (process is running), 1 (process not running) + # RUNNING (1 = running, 0 = not running) + ################################################################################ + IsRunning() { RUNNING=0 @@ -700,8 +705,10 @@ if [ ! "${FIND}" = "" ]; then RUNNING=1 LogText "IsRunning: process '$1' found (${FIND})" + return 0 else LogText "IsRunning: process '$1' not found" + return 1 fi }