-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshutdown.sh
More file actions
executable file
·36 lines (26 loc) · 1014 Bytes
/
shutdown.sh
File metadata and controls
executable file
·36 lines (26 loc) · 1014 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
#!/bin/bash
#!/bin/bash
# Shutdown backend and frontend processes and clean up workspace
echo "Stopping backend and frontend servers..."
# Kill backend (uvicorn)
pkill -f "uvicorn"
# Kill frontend (Flask)
pkill -f "flask"
# Kill any python process on port 5173 (Flask dev server)
lsof -ti:5173 | xargs kill -9
echo "Backend and frontend processes terminated."
echo "Deactivating any active virtual environments (if running interactively)..."
deactivate 2>/dev/null || true
echo "Deleting all __pycache__ folders..."
find . -type d -name "__pycache__" -exec rm -rf {} +
echo "Deleting all .env files..."
find . -type f -name ".env" -exec rm -f {} +
echo "Deleting all files in app/backend/narration..."
echo "Deleting backend/backend.log file..."
rm -f app/backend/backend.log
rm -f app/backend/narration/*
echo "Deleting frontend/fontend.log file..."
rm -f app/frontend/frontend.log
echo "Deleting all .venv folders..."
find . -type d -name ".venv" -exec rm -rf {} +
echo "Shutdown and cleanup complete."