-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathstop_aura.sh
More file actions
executable file
·38 lines (32 loc) · 1.05 KB
/
stop_aura.sh
File metadata and controls
executable file
·38 lines (32 loc) · 1.05 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
#!/usr/bin/env bash
echo "+--------------------------------------+"
echo "| AURA Cleanup Utility |"
echo "+--------------------------------------+"
echo ""
# Get the directory of the script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
PID_FILE=".aura_pids"
if [ -f "$PID_FILE" ]; then
echo "Stopping background processes listed in $PID_FILE..."
while read -r pid; do
if [ -n "$pid" ]; then
if kill -0 "$pid" 2>/dev/null; then
echo "Killing PID $pid and its descendants..."
pkill -P "$pid" 2>/dev/null
kill -9 "$pid" 2>/dev/null
fi
fi
done < "$PID_FILE"
rm -f "$PID_FILE"
else
echo "No .aura_pids file found."
fi
# Fallback safely without killing completely unrelated things
echo "Attempting to kill lingering AURA processes..."
pkill -f "token_server.py" 2>/dev/null
pkill -f "agent.py dev" 2>/dev/null
pkill -f "app.main:app" 2>/dev/null
pkill -f "vite.*dashboard" 2>/dev/null
echo ""
echo "All AURA services stopped."