ansible-role-mariadb/files/automysqlbackup_post_script
phil 8566011e51 Change default shell
source is a bash command
2024-04-15 09:26:23 +02:00

13 lines
328 B
Bash

#!/bin/bash
source /etc/default/automysqlbackup
# available variables:
# strings, i.e. character sequences
echo "$BACKUPDIR"
[ -z "$BACKUPDIR" ] && echo >&2 "Invalid / unknown BACKUPDIR" && exit 1
# Loeschen der alten Backups
find "${BACKUPDIR}/monthly" "${BACKUPDIR}/weekly" "${BACKUPDIR}/daily" -type f -mtime +5 -delete