From dd42cd08b0c812abf828e37d1c01cdbd38edb920 Mon Sep 17 00:00:00 2001 From: deajan Date: Fri, 2 Sep 2016 16:33:23 +0200 Subject: [PATCH] Fixed problem with gpg 1 --- dev/n_obackup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev/n_obackup.sh b/dev/n_obackup.sh index 5588871..2d6dc60 100755 --- a/dev/n_obackup.sh +++ b/dev/n_obackup.sh @@ -2,6 +2,7 @@ #TODO: missing files says Backup succeed #TODO: add new encryption variable checks, also upgrade script +#TODO: ListingDatabases fail succeed ###### Remote push/pull (or local) backup script for files & databases PROGRAM="obackup" @@ -1040,8 +1041,11 @@ function DecryptFiles { exit 1 fi - if [ -f "$passphraseFile" ]; then + #TODO: This is an Fix: gpg 1.4.11 fails with passphrase-file but not with passphrase $(cat file) + if [ "$CRYPT_TOOL" == "gpg2" ] && [ -f "$passphraseFile" ]; then secret="--passphrase-file $passphraseFile" + elif [ "$CRYPT_TOOL" == "gpg" ] && [ -f "$passphraseFile" ]; then + secert="$$passphrase $(cat "$passphraseFile")" elif [ "$passphrase" != "" ]; then secret="--passphrase $passphrase" else