sh.zio.backup: add ntfy
parent
bbdc4eaa42
commit
16a006ab98
|
@ -92,15 +92,21 @@ function invoke_restic() {
|
||||||
if [[ $? == 0 ]]; then
|
if [[ $? == 0 ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
echo "---- THE OUTPUT: $restic_out"
|
say warning "Command failed."
|
||||||
if [[ $attempts == 0 ]]; then
|
/usr/bin/sh.zio.backup \
|
||||||
say warning "Command failed. No attempts left"
|
--title "Backup failed" \
|
||||||
break
|
--message "$restic_out" \
|
||||||
else
|
--level "warning"
|
||||||
attempts=$((attempts - 1))
|
break
|
||||||
say warning "Command failed. Trying again in $attempts_delay seconds ($attempts attempts remaining)..."
|
#echo "---- THE OUTPUT: $restic_out"
|
||||||
sleep $attempts_delay
|
#if [[ $attempts == 0 ]]; then
|
||||||
fi
|
# 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
|
fi
|
||||||
|
|
||||||
set +o pipefail
|
set +o pipefail
|
||||||
|
|
Loading…
Reference in New Issue