From 30751e8c3f8e79c2d33fcbf92a8bd435bdde3da9 Mon Sep 17 00:00:00 2001 From: capntack Date: Sat, 23 Mar 2024 15:32:12 -0500 Subject: [PATCH] Moved a command that called a variable to after vars were sourced --- templates/backupsTemplate.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/backupsTemplate.sh b/templates/backupsTemplate.sh index 6650c03..b3a6817 100644 --- a/templates/backupsTemplate.sh +++ b/templates/backupsTemplate.sh @@ -4,15 +4,15 @@ # SCRIPT PREP # ############### +# Source base directory of script and source variables +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +. "${SCRIPT_DIR}"/backupsVariables.sh + # Update restic if [ $UPDATE = 'yes' ]; then restic self-update fi -# Source base directory of script and source variables -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -. "${SCRIPT_DIR}"/variables.sh - ############################ # LOGGING & ERROR HANDLING # ############################ @@ -65,7 +65,7 @@ fi # Overwrite LAN restic variables with the AWS restic variables if [ $LAN_AND_AWS_RESTIC = 'yes' ]; then - . "${SCRIPT_DIR}"/variablesAWS.sh + . "${SCRIPT_DIR}"/backupsVariablesAWS.sh fi # If selected, run a remote restic backup