1
Fork 0
mirror of https://github.com/Steffo99/backup-duplicity.git synced 2024-10-16 14:07:26 +00:00

Quote variables

This commit is contained in:
Steffo 2023-05-17 14:33:44 +02:00
parent 7d2fe5b4be
commit d2dbadf7d5
Signed by: steffo
GPG key ID: 2A24051445686895

View file

@ -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
;;
*)