-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstop_all
More file actions
executable file
·26 lines (22 loc) · 856 Bytes
/
stop_all
File metadata and controls
executable file
·26 lines (22 loc) · 856 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
echo "Stopping all IoT services..."
for port in 8080 8081 8082 8083 8084 8085; do
pid=$(lsof -ti :$port 2>/dev/null)
if [ ! -z "$pid" ]; then
echo "Stopping service on port $port (PID: $pid)"
kill $pid 2>/dev/null
fi
done
echo "Stopping any remaining Python services..."
pkill -f "python.*message_broker" 2>/dev/null
pkill -f "python.*raspberrypi" 2>/dev/null
pkill -f "python.*timeSeriesDbConnector" 2>/dev/null
pkill -f "python.*analytics" 2>/dev/null
pkill -f "python.*account_manager" 2>/dev/null
if command -v tmux &> /dev/null; then
tmux kill-session -t iot-broker 2>/dev/null
tmux kill-session -t iot-raspberry 2>/dev/null
tmux kill-session -t iot-timeseries 2>/dev/null
tmux kill-session -t iot-analytics 2>/dev/null
tmux kill-session -t iot-account 2>/dev/null
fi
echo "✓ All services stopped"