Files
iptv-manager-service/scripts/destroy.sh
Stefano 732667cf64
All checks were successful
AWS Deploy on Push / build (push) Successful in 4m15s
Added SSL cert generation and installation. Moved variables to ENV
2025-05-20 12:45:55 -05:00

19 lines
664 B
Bash
Executable File

#!/bin/bash
# Load environment variables from .env file if it exists
if [ -f ${PWD}/.env ]; then
export $(cat ${PWD}/.env | xargs)
fi
# Check if required environment variables are set
if [ -z "$FREEDNS_User" ] || [ -z "$FREEDNS_Password" ] || [ -z "$DOMAIN_NAME" ]; then
echo "Error: FREEDNS_User, FREEDNS_Password, and DOMAIN_NAME must be set as environment variables or in a .env file."
exit 1
fi
# Optional: Print the variables being used (for verification)
echo "Using DOMAIN_NAME: $DOMAIN_NAME"
echo "Using FREEDNS_User: $FREEDNS_User" # Be cautious printing passwords
# Destroy infrastructure
cdk destroy --app="python3 ${PWD}/app.py" --force