#!/bin/bash
set -e

echo "Swapping Apache configuration to LOCAL..."

# Copy local configurations to Apache sites-available
cp /var/www/html/Document/local/app_edistry_com.conf /etc/apache2/sites-available/app_edistry_com.conf
# cp /var/www/html/Document/local/spysms_edistry_com.conf /etc/apache2/sites-available/spysms_edistry_com.conf

# Enable the sites
a2ensite app_edistry_com.conf
# a2ensite spysms_edistry_com.conf

# Reload Apache
systemctl reload apache2

echo "✅ Apache configuration successfully swapped to LOCAL."
