Skip to content

Commit

Permalink
more precise status on backup result
Browse files Browse the repository at this point in the history
  • Loading branch information
per2jensen committed Feb 25, 2024
1 parent f3c7d8a commit f7b250a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/dar-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,9 @@ else
fi

if [[ "$BACKUP_OK" == "0" ]]; then
log_success "Backup ended, all ok"
sendDiscordMsg "$SCRIPTNAME ended without errors"
log_success "Backup ended ok"
else
sendDiscordMsg "ERROR: $SCRIPTNAME ended with errors"
log_error "Errors found during backup, test or restore-test"
fi

if [[ "$CATALOG_OK" == "0" ]]; then
Expand All @@ -209,7 +208,9 @@ fi


if [[ "$BACKUP_OK" == "0" && "$CATALOG_OK" == "0" ]]; then
sendDiscordMsg "$SCRIPTNAME ended without errors"
exit 0
else
sendDiscordMsg "ERROR: $SCRIPTNAME ended with errors"
exit 1
fi

0 comments on commit f7b250a

Please sign in to comment.