15 lines
417 B
Django/Jinja
15 lines
417 B
Django/Jinja
#!/bin/bash
|
|
|
|
{{ ansible_managed | comment }}
|
|
|
|
source /etc/default/autopostgresqlbackup
|
|
|
|
# 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 +{{ autopostgresqlbackup_delete_backups_after_days }} -delete
|