This commit is contained in:
Torjus Håkestad 2024-06-02 23:59:14 +02:00
parent 33f125a7e8
commit 30050d68cd

View File

@ -7,7 +7,6 @@ let
pkgs.restic pkgs.restic
]; ];
text = '' text = ''
# shellcheck disable=SC2031
if [ -z "$BACKUP_HELPER_DIRS" ]; then if [ -z "$BACKUP_HELPER_DIRS" ]; then
echo "BACKUP_HELPER_DIRS is not set" echo "BACKUP_HELPER_DIRS is not set"
exit 1; exit 1;
@ -18,7 +17,7 @@ let
output=$(restic backup "$i"); output=$(restic backup "$i");
if [ "$?" -ne 0 ]; then if [ "$?" -ne 0 ]; then
exit_code="$?"; exit_code="$?";
echo "Backup of $i failed with exit code $rc:" echo "Backup of $i failed with exit code $?:"
echo "$output" echo "$output"
else else
echo "Backup of $i successful:" echo "Backup of $i successful:"