aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xalpine-backup7
1 files changed, 6 insertions, 1 deletions
diff --git a/alpine-backup b/alpine-backup
index cf05943..446218b 100755
--- a/alpine-backup
+++ b/alpine-backup
@@ -9,7 +9,12 @@ else
exit 1
fi
-mkdir -p "$BACKUP_LOCATION" "$BACKUP_CACHE"
+if [ -n "$BACKUP_LOCATION" ] && [ -n " $BACKUP_CACHE" ]; then
+ mkdir -p "$BACKUP_LOCATION" "$BACKUP_CACHE"
+else
+ echo "Error: BACKUP_LOCATION and/or BACKUP_CACHE are not set!"
+ exit 1
+fi
# set the suffix of backup files when ecryptions is enabled
[ -n "$ENCRYPTION" ] && export SUFFIX=".$ENCRYPTION"