-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·45 lines (38 loc) · 1015 Bytes
/
start.sh
File metadata and controls
executable file
·45 lines (38 loc) · 1015 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
40
41
42
43
44
45
#!/bin/bash
echo "========================================"
echo "SmartVehEntryAI - Starting Service"
echo "========================================"
echo ""
# Activate virtual environment if it exists
if [ -d "venv" ]; then
echo "Activating virtual environment..."
source venv/bin/activate
fi
# Function to cleanup on exit
cleanup() {
echo ""
echo "Stopping service..."
kill $APP_PID 2>/dev/null
echo "Service stopped."
exit 0
}
# Trap Ctrl+C
trap cleanup INT TERM
echo "Starting SmartVehEntryAI on port 8000..."
uvicorn app:app --reload --host 0.0.0.0 --port 8000 &
APP_PID=$!
echo ""
echo "========================================"
echo "Service Started!"
echo "========================================"
echo "Staff Interface: http://localhost:8000"
echo "Admin Panel: http://localhost:8000/admin/login"
echo ""
echo "Admin Credentials:"
echo " Username: admin"
echo " Password: admin123"
echo ""
echo "Press Ctrl+C to stop the service..."
echo ""
# Wait for process
wait