diff --git a/b2-backup.sh b/b2-backup.sh index 9e32300..d5ea65d 100755 --- a/b2-backup.sh +++ b/b2-backup.sh @@ -1,7 +1,10 @@ -#!/bin/sh +#!/bin/bash + +set -ue # Import all account and GPG variables source ./b2.cred +export PASSPHRASE=${GPG_PASSPHRASE} # Local directory to backup LOCAL_DIR="/media/usb0/backup" @@ -20,3 +23,6 @@ duplicity cleanup --force \ duplicity collection-status \ --encrypt-sign-key $GPG_KEY \ b2://${B2_ACCOUNT}:${B2_KEY}@${B2_BUCKET} + +# Unset the GPG passphrase +unset PASSPHRASE