sh.zio.backup: add prototyping
parent
f683715663
commit
6a9219c3b4
|
@ -88,12 +88,10 @@ function invoke_restic() {
|
||||||
--repo "$(cat $restic_repo_file)" \
|
--repo "$(cat $restic_repo_file)" \
|
||||||
$command $args 2>&1 | tee /dev/fd/3)"
|
$command $args 2>&1 | tee /dev/fd/3)"
|
||||||
|
|
||||||
echo "------"
|
|
||||||
echo "$restic_out"
|
|
||||||
|
|
||||||
if [[ $? == 0 ]]; then
|
if [[ $? == 0 ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
echo "---- THE OUTPUT: $restic_out"
|
||||||
if [[ $attempts == 0 ]]; then
|
if [[ $attempts == 0 ]]; then
|
||||||
say warning "Command failed. No attempts left"
|
say warning "Command failed. No attempts left"
|
||||||
break
|
break
|
||||||
|
@ -103,6 +101,8 @@ function invoke_restic() {
|
||||||
sleep $attempts_delay
|
sleep $attempts_delay
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exec 3>&-
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue