Improve printing

This commit is contained in:
Torjus Håkestad 2025-01-27 22:59:26 +01:00
parent 945a5ea3dd
commit f9540cc065
Signed by: torjus
SSH Key Fingerprint: SHA256:KjAds8wHfD2mBYK2H815s/+ABcSdcIHUndwHEdSxml4

View File

@ -33,10 +33,10 @@ if [ -n "$BACKUP_HELPER_COMMANDS" ]; then
IFS=' ' read -r -a cmd_parts <<< "$value"
if ! output=$(restic backup --stdin-filename "$key" --stdin-from-command -- "${cmd_parts[@]}"); then
exit_code=1;
echo "Backup of $i failed with exit code $?:"
echo "Backup of $key failed with exit code $?:"
echo "$output"
else
echo "Backup of $i successful:"
echo "Backup of $key successful:"
echo "$output"
fi