-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·42 lines (32 loc) · 1.11 KB
/
start.sh
File metadata and controls
executable file
·42 lines (32 loc) · 1.11 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
#!/bin/bash
# Start all IDS components with a single script
# This script starts the backend server, Suricata integration, and frontend
echo "Starting IDS System..."
# Create logs directory if it doesn't exist
mkdir -p logs
# Start the backend server
echo "Starting Backend Server..."
cd "$(dirname "$0")"
python3 backend/server.py > logs/server.log 2>&1 &
SERVER_PID=$!
echo "Backend Server started with PID: $SERVER_PID"
# Wait a moment for the server to initialize
sleep 2
# Start Suricata integration
echo "Starting Suricata Integration..."
python3 backend/suricata_integration.py > logs/suricata.log 2>&1 &
SURICATA_PID=$!
echo "Suricata Integration started with PID: $SURICATA_PID"
# Start the frontend
echo "Starting Frontend..."
cd frontend
npm run dev > ../logs/frontend.log 2>&1 &
FRONTEND_PID=$!
echo "Frontend started with PID: $FRONTEND_PID"
echo "All components started successfully!"
echo "To view logs, check the logs directory"
echo "To stop all components, run: ./stop.sh"
# Save PIDs to file for stop script
cd ..
echo "$SERVER_PID $SURICATA_PID $FRONTEND_PID" > .running_pids
echo "IDS is now running!"