#!/bin/bash
# After adding DNS TXT record, run this to complete SSL certificate

echo "Checking DNS propagation..."
dig +short TXT _acme-challenge.wakelai.com

echo ""
echo "If the correct TXT record is shown above, press Enter to continue..."
read

echo "Requesting wildcard SSL certificate..."
certbot certonly --manual --preferred-challenges dns \
  -d '*.wakelai.com' -d 'wakelai.com' \
  --agree-tos --no-eff-email

echo ""
echo "Certificate obtained! Checking..."
certbot certificates | grep wakelai.com
