sh.zio.backup: forward exit code from restic
parent
77e9fe3abd
commit
0451746b3b
|
@ -75,12 +75,11 @@ function invoke_restic() {
|
||||||
elif [[ $command == "self-update" ]]; then
|
elif [[ $command == "self-update" ]]; then
|
||||||
say warning "Command '$command' not supported. Not running"
|
say warning "Command '$command' not supported. Not running"
|
||||||
else
|
else
|
||||||
# TODO: Handle deadlocks (--retry-lock could go on forever)
|
|
||||||
"$restic_path" \
|
"$restic_path" \
|
||||||
--cache-dir "$cache_dir" \
|
--cache-dir "$cache_dir" \
|
||||||
--password-file "$restic_repo_passwd_file" \
|
--password-file "$restic_repo_passwd_file" \
|
||||||
--repo "$(cat $restic_repo_file)" \
|
--repo "$(cat $restic_repo_file)" \
|
||||||
--retry-lock 1m \
|
--retry-lock 1h \
|
||||||
$command $args
|
$command $args
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -266,4 +265,5 @@ else
|
||||||
arguments="${@:2}"
|
arguments="${@:2}"
|
||||||
say info "Running: $restic_path $command $arguments"
|
say info "Running: $restic_path $command $arguments"
|
||||||
invoke_restic $command $arguments
|
invoke_restic $command $arguments
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue