From c009a910557a2c3411d76f9ffddebb133d7f6f63 Mon Sep 17 00:00:00 2001 From: Daniel Dolezal Date: Tue, 27 Sep 2022 21:18:34 +0200 Subject: [PATCH] fix bug that borg backup vars not providet --- scripts/functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index 19f11ad..17167b9 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -39,9 +39,9 @@ function check_borg_backup_vars() { local errors=0 if [ ! -z "$BORG_BACKUP_TRUE" ]; then - if [ "$BORG_REPO" ]; then echo "Musst provice BORG_REPO"; errors=$(($errors + 1)); fi - if [ "$BORG_CREATE_PARAMS" ]; then echo "Musst provice BORG_CREATE_PARAMS"; errors=$(($errors + 1)); fi - if [ "$BORG_PRUNE_PARAMS" ]; then echo "Musst provice BORG_PRUNE_PARAMS"; errors=$(($errors + 1)); fi + if [ -z "$BORG_REPO" ]; then echo "Musst provice BORG_REPO"; errors=$(($errors + 1)); fi + if [ -z "$BORG_CREATE_PARAMS" ]; then echo "Musst provice BORG_CREATE_PARAMS"; errors=$(($errors + 1)); fi + if [ -z "$BORG_PRUNE_PARAMS" ]; then echo "Musst provice BORG_PRUNE_PARAMS"; errors=$(($errors + 1)); fi fi if [ $errors -ne 0 ]; then exit 1; fi