-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop_all.sh
More file actions
executable file
·65 lines (53 loc) · 1.36 KB
/
stop_all.sh
File metadata and controls
executable file
·65 lines (53 loc) · 1.36 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# Email Client CLI - Stop All Services Script
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Function to print colored output
print_status() {
echo -e "${BLUE}[$(date +'%Y-%m-%d %H:%M:%S')]${NC} $1"
}
print_success() {
echo -e "${GREEN}✓${NC} $1"
}
print_error() {
echo -e "${RED}✗${NC} $1"
}
echo ""
print_status "Stopping Email Client CLI services..."
echo ""
# Kill processes by name
services_stopped=0
# Stop main email processor
if pkill -f "python main.py"; then
print_success "Email processor stopped"
((services_stopped++))
else
print_error "Email processor was not running"
fi
# Stop admin backend (uvicorn)
if pkill -f "uvicorn main:app"; then
print_success "Admin backend stopped"
((services_stopped++))
else
print_error "Admin backend was not running"
fi
# Stop admin frontend (vite/npm)
if pkill -f "vite.*admin_panel/frontend"; then
print_success "Admin frontend stopped"
((services_stopped++))
else
print_error "Admin frontend was not running"
fi
# Also try to kill any npm dev processes in the frontend directory
pkill -f "npm.*dev.*admin_panel/frontend" 2>/dev/null
echo ""
if [ $services_stopped -gt 0 ]; then
print_success "Stopped $services_stopped service(s)"
else
print_status "No services were running"
fi
echo ""