#!/bin/bash # Start the Email API service # # Required environment variables: # SMTP_HOST - SMTP server hostname # SMTP_USER - SMTP username # SMTP_PASS - SMTP password # # Optional: # SMTP_PORT - SMTP port (default: 587) # SMTP_FROM - Default from address # API_KEY - API key for authentication # DB_HOST - MySQL host (default: 192.168.122.1) # DB_USER - MySQL user (default: 570005354) # DB_PASS - MySQL password cd "$(dirname "$0")" # Check for virtual environment if [ ! -d "venv" ]; then echo "Creating virtual environment..." python3 -m venv venv source venv/bin/activate pip install -r requirements.txt else source venv/bin/activate fi # Start the API echo "Starting Email API on port 5000..." python app.py