Fix inaccurate counter in restic-job script
This commit is contained in:
parent
838d9b00dd
commit
6a55359d28
@ -111,10 +111,12 @@ until [ $counter -eq "$MAX_ATTEMPTS" ] || [ $rc -eq 0 ]; do
|
|||||||
|
|
||||||
rc=$?
|
rc=$?
|
||||||
|
|
||||||
if [ $rc -ne 0 ]; then
|
if [ $rc -eq 0 ]; then
|
||||||
sleep=$((counter * 5))
|
break
|
||||||
printf "sleeping for %d seconds (%d)\n" $sleep $counter
|
else
|
||||||
sleep $sleep
|
sleep=$((counter * 5))
|
||||||
|
printf "sleeping for %d seconds (%d)\n" $sleep $counter
|
||||||
|
sleep $sleep
|
||||||
fi
|
fi
|
||||||
|
|
||||||
(( counter++ ))
|
(( counter++ ))
|
||||||
|
Loading…
Reference in New Issue
Block a user