You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
570 B
27 lines
570 B
#!/bin/bash
|
|
|
|
# Navigate to the project directory (optional)
|
|
cd "$(dirname "$0")"
|
|
|
|
# Activate virtual environment
|
|
source venv/bin/activate
|
|
|
|
# Start the bot
|
|
echo "Starting bot..."
|
|
python3 bot/bot_app.py &
|
|
|
|
# Save the bot PID so you can stop it later if needed
|
|
BOT_PID=$!
|
|
|
|
# Start the website
|
|
echo "Starting web server..."
|
|
python3 web/app.py &
|
|
|
|
# Save the web PID too
|
|
WEB_PID=$!
|
|
|
|
# On CTRL+C or termination, kill both
|
|
trap "echo 'Stopping...'; kill $BOT_PID $WEB_PID; exit" SIGINT SIGTERM
|
|
|
|
# Wait for both processes (if you want it to stay attached)
|
|
wait $BOT_PID $WEB_PID
|
|
|