about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xhtml/matt-chat/server.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/html/matt-chat/server.sh b/html/matt-chat/server.sh
index 80a44f2..c526f9e 100755
--- a/html/matt-chat/server.sh
+++ b/html/matt-chat/server.sh
@@ -1,9 +1,8 @@
 #!/bin/bash
 
-# check that the ollama server is running, if it isn't, start it
+# check that the ollama server is running, if it isn't, start it in the background and continue with the script
 if ! pgrep -f ollama; then
-    echo "Ollama server is not running. Starting it now..."
-    ollama start
+    ollama start &
 fi
 
 # check that port 38478 is free
@@ -12,8 +11,8 @@ if lsof -i :38478; then
     exit 1
 fi
 
-# Start a simple HTTP server using Python on port 38478
-python3 -m http.server 38478
+# Start a simple HTTP server using Python on port 38478 and run it in the background
+python3 -m http.server 38478 &
 
 
 #   nvim ~/Library/LaunchAgents/com.user.server.plist