Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Certbot on AWS EC2 does not support manual challenge #646

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
6 changes: 5 additions & 1 deletion extra/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ function letsencrypt_cert() {
EOF
sudo chmod +x /root/tmp/certbot.sh
else
/usr/bin/certbot-auto certonly -n --agree-tos --standalone --standalone-supported-challenges tls-sni-01 -m "$__myemail" -d "$__mydomain"
if [ -f /sys/hypervisor/uuid ] && [ `head -c 3 /sys/hypervisor/uuid` == ec2 ]; then
/usr/bin/certbot-auto certonly -n --agree-tos --standalone -m "$__myemail" -d "$__mydomain"
else
/usr/bin/certbot-auto certonly -n --agree-tos --standalone --standalone-supported-challenges tls-sni-01 -m "$__myemail" -d "$__mydomain"
fi
sudo ln -s "/etc/letsencrypt/live/$__mydomain/fullchain.pem" "$1" || true
sudo ln -s "/etc/letsencrypt/live/$__mydomain/privkey.pem" "$2" || true
fi
Expand Down