From 68bc4dd596e93b58087f9a2e1b6c5bc0c9fbe5bd Mon Sep 17 00:00:00 2001 From: Daniel Dolezal Date: Tue, 27 Sep 2022 21:14:18 +0200 Subject: [PATCH] add more sepurators to output --- backup.sh | 1 + pfsense-backup.sh | 2 ++ scripts/functions.sh | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index 72a53a6..a9e6975 100644 --- a/backup.sh +++ b/backup.sh @@ -5,4 +5,5 @@ source "/scripts/functions.sh" url=${PFSENSE_SCHEME}://${PFSENSE_IP} timestamp=$(date +%Y%m%d%H%M%S) +sepurator run_backups diff --git a/pfsense-backup.sh b/pfsense-backup.sh index b95e1cd..c8e8658 100755 --- a/pfsense-backup.sh +++ b/pfsense-backup.sh @@ -28,9 +28,11 @@ if [ $cron -eq 1 ]; then if [ -z "$FROM_CRON" ]; then load_crontab_when_exists_or_create else + sepurator run_backups cleanup_old_backups_when_set fi else + sepurator run_backups fi diff --git a/scripts/functions.sh b/scripts/functions.sh index a94fc19..19f11ad 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -38,7 +38,7 @@ function check_pfSense_optional_vars() { function check_borg_backup_vars() { local errors=0 - if [ -z "$BORG_BACKUP_TRUE" ]; then + 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