GPG passphrase must be an environment variable

This commit is contained in:
Wojciech Kozlowski 2019-12-14 22:03:12 +00:00
parent 494822a0bf
commit c353f45612

View File

@ -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