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 }