fix(aws-backup.sh): add exit mode if no files/folders written

This commit is contained in:
2025-09-15 07:30:07 +00:00
parent 2bec27f397
commit 2af11b489f

View File

@@ -56,6 +56,10 @@ if [[ "$1" == "clean" ]]; then
exit 0
fi
if [[ ! -s "BACKUP" ]]; then
exit 0
fi
while IFS= read -r SOURCE_PATH || [ -n "$SOURCE_PATH" ]; do
if [[ -z "$SOURCE_PATH" || "$SOURCE_PATH" =~ ^[[:space:]]*$ ]]; then
continue
@@ -102,4 +106,4 @@ if [[ "$BACKUP_SUCCESS" == true ]]; then
send_notification "<b>💿 AWS Backup 💿 :</b> All files successfully backed up."
else
send_notification "<b>💿 AWS Backup 💿 :</b> One or more files failed to back up. Check the log for details."
fi
fi