Fix inaccurate counter in restic-job script

This commit is contained in:
Ryan Cavicchioni 2020-10-10 10:54:25 -05:00
parent 838d9b00dd
commit 6a55359d28
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -111,7 +111,9 @@ until [ $counter -eq "$MAX_ATTEMPTS" ] || [ $rc -eq 0 ]; do
rc=$? rc=$?
if [ $rc -ne 0 ]; then if [ $rc -eq 0 ]; then
break
else
sleep=$((counter * 5)) sleep=$((counter * 5))
printf "sleeping for %d seconds (%d)\n" $sleep $counter printf "sleeping for %d seconds (%d)\n" $sleep $counter
sleep $sleep sleep $sleep