#!/bin/bash

# Setup Apache configuration for LiveKit VoiceBot
echo "Setting up Apache configuration for LiveKit VoiceBot..."

# Copy configuration file
cp /var/www/html/livekit_frontend/apache-config.conf /etc/apache2/sites-available/livekit-voicebot.conf

# Enable the site
a2ensite livekit-voicebot.conf

# Test Apache configuration
apache2ctl configtest

# Reload Apache
systemctl reload apache2

echo "Apache configuration completed!"
echo "Frontend accessible at: http://10.40.180.74"
echo ""
echo "Services running:"
echo "  - Frontend: http://localhost:3000 (proxied through Apache)"
echo "  - Backend: Python agent running with uv"
