diff --git a/extra/lib.sh b/extra/lib.sh index 9dbeddca..b84c2847 100755 --- a/extra/lib.sh +++ b/extra/lib.sh @@ -132,14 +132,14 @@ function letsencrypt_cert() { cat <<- EOF > /root/tmp/certbot.sh #!/bin/bash if [[ ! ( -d /etc/letsencrypt && "\$(ls -A /etc/letsencrypt)" ) ]]; then - /usr/bin/certbot-auto certonly -n --agree-tos --standalone --standalone-supported-challenges tls-sni-01 -m "$__myemail" -d "$__mydomain" + sudo /usr/bin/certbot-auto certonly -n --agree-tos --standalone --preferred-challenges http -m "$__myemail" -d "$__mydomain" fi sudo ln -sf "/etc/letsencrypt/live/$__mydomain/fullchain.pem" "$1" sudo ln -sf "/etc/letsencrypt/live/$__mydomain/privkey.pem" "$2" 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" + sudo /usr/bin/certbot-auto certonly -n --agree-tos --standalone --preferred-challenges http -m "$__myemail" -d "$__mydomain" sudo ln -s "/etc/letsencrypt/live/$__mydomain/fullchain.pem" "$1" || true sudo ln -s "/etc/letsencrypt/live/$__mydomain/privkey.pem" "$2" || true fi