From 2769a78198b69e296a5717b869d69c92af7dd58d Mon Sep 17 00:00:00 2001 From: Salt Date: Sun, 3 May 2020 06:08:36 -0500 Subject: [PATCH] Source a backuprc if we have it to allow for site-local backup storage changes --- roles/backups/templates/backup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/backups/templates/backup.sh b/roles/backups/templates/backup.sh index ffd84ba..0a23d81 100644 --- a/roles/backups/templates/backup.sh +++ b/roles/backups/templates/backup.sh @@ -19,7 +19,7 @@ log() { printf "$(date -Iseconds): $1\n" } -# Do the do +# Sanity checks if ! [ -d "$BACKUPSDIR" ]; then log "Unable to find backups directory: $BACKUPSDIR" exit 1 @@ -28,6 +28,11 @@ if ! [ -d "$MODULESDIR" ]; then log "Unable to find modules directory: $MODULESDIR" exit 2 fi +# Source an RC, if we have it +if [ -r "$MODULESDIR/backuprc" ]; then + source "$MODULESDIR/backuprc" +fi +# Do the do log "Beginning backups" for file in "$MODULESDIR"/*; do # Just keep going if we don't have any tasks to do