Use set -e in case fetching the passphrase fails

main
Charlotte Som 2021-11-26 11:45:16 +00:00
parent 1a7da418ba
commit a9f068f237
1 changed files with 2 additions and 0 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash
set -e
echo "[+] Finding latest snapshot..."
latest_snapshot=$(ls /media/storage/backup/snapshots | sort | tail -n1)
passphrase=$(rage -d -i /media/storage/backup/static-passphrase-key /dev/shm/backup-passphrase)