for h in zoehub.xyz www.zoehub.xyz ada.zoehub.xyz; do
  code=$(curl -s -o /dev/null -w "%{http_code}" --resolve "$h:443:127.0.0.1" "https://$h/" -m 10)
  echo "$h  ->  HTTP $code"
done
echo "--- apex <title> ---"
curl -s --resolve zoehub.xyz:443:127.0.0.1 https://zoehub.xyz/ -m 10 | grep -ioE "<title>[^<]*</title>" | head -1
echo "--- ada <title> ---"
curl -s --resolve ada.zoehub.xyz:443:127.0.0.1 https://ada.zoehub.xyz/ -m 10 | grep -ioE "<title>[^<]*</title>" | head -1
echo "--- http apex should 308 -> https ---"
curl -s -o /dev/null -w "http apex -> %{http_code}  location=%{redirect_url}\n" --resolve zoehub.xyz:80:127.0.0.1 http://zoehub.xyz/ -m 10
echo "--- cert files present ---"
sudo ls /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/ 2>/dev/null
echo DONE
