From de327e663b4edb8dcc47de74232670b0c267a095 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Wed, 19 Sep 2018 16:50:32 -0600 Subject: [PATCH] Check for mandatory sqlDumpDir parameter --- backup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backup.sh b/backup.sh index 36b3c77..f86a719 100755 --- a/backup.sh +++ b/backup.sh @@ -131,6 +131,11 @@ if [ $(id -u) -ne 0 ]; then fi +### Check for mandatory parameters +if [ -z "$sqlDumpDir" ] || [[ "$sqlDumpDir" == -* ]]; then + quit 101 +fi + ### Set logging verbosity based on invocation parameters if [ "$logLevel" = "normal" ]; then borgCreateParams='--stats'