generated from Pseudo-Lab/builder-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathstop_web.sh
More file actions
executable file
·39 lines (30 loc) · 884 Bytes
/
stop_web.sh
File metadata and controls
executable file
·39 lines (30 loc) · 884 Bytes
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
# Stop backend (port 8080) and Next.js frontend (port 3000)
set -e
echo "🛑 Stopping Agent Kiosk Agent services..."
echo ""
# Function to kill processes on a specific port
kill_port() {
local port=$1
local service=$2
if lsof -ti:${port} > /dev/null 2>&1; then
echo "🔍 Found ${service} running on port ${port}"
lsof -ti:${port} | xargs kill -9 2>/dev/null || true
sleep 1
# Verify process was killed
if lsof -ti:${port} > /dev/null 2>&1; then
echo "⚠️ Warning: ${service} still running on port ${port}"
else
echo "✅ ${service} stopped successfully"
fi
else
echo "ℹ️ No ${service} process found on port ${port}"
fi
}
# Stop backend on port 8080
kill_port 8080 "Backend (FastAPI)"
echo ""
# Stop frontend on port 3000
kill_port 3000 "Frontend (Next.js)"
echo ""
echo "✅ All services stopped!"