diff --git a/files/scripts/llm_swap_stopper.sh b/files/scripts/llm_swap_stopper.sh index c59b284..2b25ff4 100755 --- a/files/scripts/llm_swap_stopper.sh +++ b/files/scripts/llm_swap_stopper.sh @@ -13,7 +13,12 @@ restart_service() { echo "ERROR: Service name must be passed to restart_service()." return 1 fi - sv restart $1 || echo "$1 failed to restart, ignoring." + sv restart $1 + status=$? + if [[ $status != 0 ]]; then + echo "$1 failed to restart, returned $status." + return $status + fi } # While we could loop over `ollama ps` and stop them, this ensures that the UIs