sh.zio.backup: forward exit code from restic
parent
77e9fe3abd
commit
0451746b3b
|
@ -75,12 +75,11 @@ 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 1m \
|
||||
--retry-lock 1h \
|
||||
$command $args
|
||||
fi
|
||||
}
|
||||
|
@ -266,4 +265,5 @@ else
|
|||
arguments="${@:2}"
|
||||
say info "Running: $restic_path $command $arguments"
|
||||
invoke_restic $command $arguments
|
||||
exit $?
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue