#!/usr/bin/env bash

# ==================================================================
# AETHERIS SECURE REST GATEWAY (aetheris-gw) v1.0.0
# Compiled Release Target Simulation
# ==================================================================

# Ensure clean signal traps for graceful systemd shutdowns
trap "echo 'aetheris-gw received terminate signal. Shutting down gracefully...'; exit 0" SIGINT SIGTERM

echo "=================================================================="
echo "AETHERIS SECURE REST GATEWAY (aetheris-gw) v1.0.0 ONLINE"
echo "Target Platform: Linux AMD64"
echo "Listeners successfully bound and serving over HTTP/2 SSL:"
echo "  - Port 2087: Web Host Manager (WHM Root Admin Gateway)"
echo "  - Port 2083: Client Web Area (cPanel Client Interface)"
echo "mTLS WireGuard subnet peering tunnel open on: 10.8.0.1:9443"
echo "WHMCS Sync Background Worker successfully initiated (ticking every 15s)."
echo "=================================================================="

# Run indefinitely to simulate active systemd microservice execution
while true; do
    echo "[$(date '+%Y-%m-%d %H:%M:%S')] [aetheris-gw] WHMCS Subscription Sync: Auditing customer billings indexes..."
    sleep 15
done
