From d2dbadf7d575cb1e3e18ccc38768d4db64902d61 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 17 May 2023 14:33:44 +0200 Subject: [PATCH] Quote variables --- backup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backup.sh b/backup.sh index ac56b5e..2eb6e2b 100755 --- a/backup.sh +++ b/backup.sh @@ -5,23 +5,23 @@ set -e # Get secrets from files # Insecure, but there's not much I can do about it # It's duplicity's fault! -export PASSPHRASE=$(cat ${DUPLICITY_PASSPHRASE_FILE}) +export PASSPHRASE=$(cat "${DUPLICITY_PASSPHRASE_FILE}") case "$MODE" in backup) echo "Launched in backup mode, performing backup..." >> /dev/stderr duplicity \ --allow-source-mismatch \ - --full-if-older-than ${DUPLICITY_FULL_IF_OLDER_THAN} \ + --full-if-older-than "${DUPLICITY_FULL_IF_OLDER_THAN}" \ /mnt \ - ${DUPLICITY_TARGET_URL} + "${DUPLICITY_TARGET_URL}" ;; restore) echo "Launched in restore mode, restoring backup..." >> /dev/stderr duplicity \ --force \ --allow-source-mismatch \ - ${DUPLICITY_TARGET_URL} \ + "${DUPLICITY_TARGET_URL}" \ /mnt ;; *)