Remove break-lock, add checking, and fix healthcheck
All checks were successful
ShellCheck / shellcheck (push) Successful in 5s
Docker / build (push) Successful in 15s

This commit is contained in:
Andras Schmelczer 2026-09-27 11:06:27 +01:00
commit be17cc81c3

20
src/borg-common.sh Normal file
View file

@ -0,0 +1,20 @@
#!/bin/bash
export BORG_RSH='ssh -oBatchMode=yes'
# Never break another client's repository/cache lock. Borg 1.4 only accepts
# finite waits, so retry lock timeouts forever; other errors must propagate.
borg_wait() {
local status
while true; do
if BORG_EXIT_CODES=modern borg "$@" --lock-wait=60; then
return 0
else
status=$?
fi
if (( status != 73 )); then
return "$status"
fi
echo "Repository or cache is locked; continuing to wait..." >&2
done
}