ansible-setup-backups/templates/backup-is-restore-needed.sh.j2
2025-09-12 21:00:45 +02:00

14 lines
199 B
Django/Jinja

#!/bin/bash
# returns code 0 if backup is necessary, 1 otherwise
eval "$DIRS_TO_BACKUP_STR"
for file in "${DIRS_TO_BACKUP[@]}"; do
if [ ! -e "$file" ]; then
exit 0
fi
done
exit 1