2
0
Fork 0
main
Ducky 2023-08-22 00:22:40 +01:00
parent 6a40e22b90
commit 769cf5f2a1
1 changed files with 9 additions and 3 deletions

View File

@ -1,9 +1,13 @@
#!/usr/bin/env bash
if [[ "$(realpath "$(dirname "$(realpath -s "$0")")/../../../")" == "/" ]]; then
. /usr/local/libexec/zio/helpers/bash.sh
if [[ -n $ZIO_HELPERS_DIR ]] && [[ -f $ZIO_HELPERS_DIR ]]; then
. "$ZIO_HELPERS_DIR/bash.sh"
else
. "$(dirname "$(realpath -s "$0")")/../libexec/zio/helpers/bash.sh"
if [[ "$(realpath "$(dirname "$(realpath -s "$0")")/../../../")" == "/" ]]; then
. /usr/local/libexec/zio/helpers/bash.sh
else
. "$(dirname "$(realpath -s "$0")")/../libexec/zio/helpers/bash.sh"
fi
fi
me_filename="$(basename "$(realpath -s "$0")")"
@ -65,10 +69,12 @@ function invoke_restic() {
elif [[ $command == "self-update" ]]; then
say warning "Command '$command' not supported. Not running"
else
# TODO: Handle deadlocks (--retry-lock could go on forever)
"$restic_path" \
--cache-dir "$cache_dir" \
--password-file "$restic_repo_passwd_file" \
--repo "$(cat $restic_repo_file)" \
--retry-lock 5m \
$command $args
fi
}