-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop-all.sh
More file actions
executable file
·39 lines (35 loc) · 1.15 KB
/
stop-all.sh
File metadata and controls
executable file
·39 lines (35 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
echo "=================================="
echo "⭐ Stopping all services..."
echo "=================================="
echo ""
echo "👀 Stop Ollama service? It may be used by other applications."
read -p "Type 'yes' to stop Ollama, or press Enter to skip: " user_input
if [ "$user_input" == "yes" ]; then
echo "🛑 Stopping Ollama service..."
if pkill -f "ollama" 2>/dev/null; then
echo " ✅ Ollama service stopped."
else
echo " ⭐ Ollama service was not running."
fi
else
echo " ⭐ Skipping Ollama service stop."
fi
# Kill any running Python HTTP servers on port 8000
echo "🛑 Stopping HTTP server on port 8000..."
if pkill -f "python3 -m http.server 8000" 2>/dev/null; then
echo " ✅ HTTP server stopped."
else
echo " ⭐ HTTP server was not running."
fi
# Kill any running search-proxy processes
echo "🛑 Stopping search proxy..."
if pkill -f "search-proxy.py" 2>/dev/null; then
echo " ✅ Search proxy stopped."
else
echo " ⭐ Search proxy was not running."
fi
echo ""
echo "=================================="
echo "✅ All services stopped"
echo "=================================="