diff --git a/templates/backupsTemplate.sh b/templates/backupsTemplate.sh index f36e90b..34b4b6a 100644 --- a/templates/backupsTemplate.sh +++ b/templates/backupsTemplate.sh @@ -4,6 +4,11 @@ # SCRIPT PREP # ############### +# Update restic +if [ $UPDATE = 'yes' ]; then + restic self-update +fi + SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) . "${SCRIPT_DIR}"/variables.sh diff --git a/templates/variablesTemplate.sh b/templates/variablesTemplate.sh index 6ac9727..e236d75 100644 --- a/templates/variablesTemplate.sh +++ b/templates/variablesTemplate.sh @@ -6,6 +6,9 @@ ## For any function that you want to run, change from "no" to "yes" +## Update restic (restic must be installed and script must be ran as root/sudo for this to work) +readonly UPDATE='no' + ## For debugging the script readonly DEBUG='no'