swap_stopper, do not let the echo prevent the function from returning an unclean status.
This commit is contained in:
1 parent
4342b8842f
commit
38a04fbda1
1 file changed
+6
-1
@@ -13,7 +13,12 @@ restart_service() {
|
|||||||
echo "ERROR: Service name must be passed to restart_service()."
|
echo "ERROR: Service name must be passed to restart_service()."
|
||||||
return 1
|
return 1
|
||||||
fi
|
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
|
# While we could loop over `ollama ps` and stop them, this ensures that the UIs
|
||||||
|
|||||||
Reference in new issue
Block a user