Fix thunderbird backup script
This commit is contained in:
parent
1ff7897e66
commit
7f8c4b4e70
@ -37,7 +37,7 @@ tar -cv -I"zstd -19 -T0" -f thunderbird-backup-${currdate}.tar.zst thunderbird-b
|
|||||||
rm -rf "$HOME/thunderbird-backup"
|
rm -rf "$HOME/thunderbird-backup"
|
||||||
|
|
||||||
# encrypt backup archive
|
# 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
|
# remove unencrypted archive
|
||||||
rm thunderbird-backup-${currdate}.tar.zst
|
rm thunderbird-backup-${currdate}.tar.zst
|
||||||
|
@ -13,7 +13,7 @@ cd "$HOME"
|
|||||||
latestbackup="$(find "$HOME/Nextcloud/backups/" -name "thunderbird-backup-*\.tar.zst.gpg" | sort | tail -1)"
|
latestbackup="$(find "$HOME/Nextcloud/backups/" -name "thunderbird-backup-*\.tar.zst.gpg" | sort | tail -1)"
|
||||||
|
|
||||||
# decrypt backup
|
# 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
|
# name of decrypted file
|
||||||
latestdecrypted="${latestbackup%.gpg}"
|
latestdecrypted="${latestbackup%.gpg}"
|
||||||
|
Loading…
Reference in New Issue
Block a user