From 19365df1ba6c881c6ba1c4a0cd14f6d7be39e74b Mon Sep 17 00:00:00 2001 From: deajan Date: Wed, 4 Jan 2017 09:08:23 +0100 Subject: [PATCH] Added pgrep preflight check --- dev/n_obackup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/n_obackup.sh b/dev/n_obackup.sh index c8a2eae..a3681bf 100755 --- a/dev/n_obackup.sh +++ b/dev/n_obackup.sh @@ -7,7 +7,7 @@ PROGRAM="obackup" AUTHOR="(C) 2013-2017 by Orsiris de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=2.1-beta1 -PROGRAM_BUILD=2017010305 +PROGRAM_BUILD=2017010401 IS_STABLE=no # Execution order #__WITH_PARANOIA_DEBUG @@ -146,6 +146,11 @@ function CheckEnvironment { if [ "$ENCRYPTION" == "yes" ]; then CheckCryptEnvironnment fi + + if ! type pgrep > /dev/null 2>&1 ; then + Logger "pgrep not present. $0 cannot start." "CRITICAL" + exit 1 + fi } function CheckCryptEnvironnment {