From ae3bbf0eb6866e50f8b3afd460e60de06be1c7f6 Mon Sep 17 00:00:00 2001 From: capntack Date: Fri, 22 Mar 2024 19:44:30 -0500 Subject: [PATCH] Add functionality to update restic --- templates/backupsTemplate.sh | 5 +++++ templates/variablesTemplate.sh | 3 +++ 2 files changed, 8 insertions(+) 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'