Fix thunderbird backup script

This commit is contained in:
exu 2023-07-22 16:34:22 +02:00
parent 1ff7897e66
commit 7f8c4b4e70
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ tar -cv -I"zstd -19 -T0" -f thunderbird-backup-${currdate}.tar.zst thunderbird-b
rm -rf "$HOME/thunderbird-backup"
# encrypt backup archive
echo '$pass' | gpg -c --batch --yes --passphrase-fd 0 thunderbird-backup-${currdate}.tar.zst
echo "$pass" | gpg -c --batch --yes --passphrase-fd 0 thunderbird-backup-${currdate}.tar.zst
# remove unencrypted archive
rm thunderbird-backup-${currdate}.tar.zst

View File

@ -13,7 +13,7 @@ cd "$HOME"
latestbackup="$(find "$HOME/Nextcloud/backups/" -name "thunderbird-backup-*\.tar.zst.gpg" | sort | tail -1)"
# decrypt backup
echo '$pass' | gpg --decrypt-file --batch --yes --passphrase-fd 0 "$latestbackup"
echo "$pass" | gpg --decrypt-file --batch --yes --passphrase-fd 0 "$latestbackup"
# name of decrypted file
latestdecrypted="${latestbackup%.gpg}"