diff --git a/usr/local/bin/sh.zio.backup b/usr/local/bin/sh.zio.backup index 9b151ed..8f84716 100755 --- a/usr/local/bin/sh.zio.backup +++ b/usr/local/bin/sh.zio.backup @@ -92,15 +92,21 @@ function invoke_restic() { if [[ $? == 0 ]]; then break else - echo "---- THE OUTPUT: $restic_out" - if [[ $attempts == 0 ]]; then - say warning "Command failed. No attempts left" - break - else - attempts=$((attempts - 1)) - say warning "Command failed. Trying again in $attempts_delay seconds ($attempts attempts remaining)..." - sleep $attempts_delay - fi + say warning "Command failed." + /usr/bin/sh.zio.backup \ + --title "Backup failed" \ + --message "$restic_out" \ + --level "warning" + break + #echo "---- THE OUTPUT: $restic_out" + #if [[ $attempts == 0 ]]; then + # say warning "Command failed. No attempts left" + # break + #else + # attempts=$((attempts - 1)) + # say warning "Command failed. Trying again in $attempts_delay seconds ($attempts attempts remaining)..." + # sleep $attempts_delay + #fi fi set +o pipefail