diff --git a/automation/roles/nginx/files/init_certbot.sh b/automation/roles/nginx/files/init_certbot.sh index 8f1f0748..0d3ed423 100755 --- a/automation/roles/nginx/files/init_certbot.sh +++ b/automation/roles/nginx/files/init_certbot.sh @@ -7,7 +7,7 @@ if [[ $(find /etc/letsencrypt/accounts -type f -name regr.json | xargs grep -l \ certbot register --agree-tos -m "${LE_EMAIL}" --non-interactive fi -if [[ ! -f /etc/letsencrypt/live/${SERVER_NAME}/fullchain.pem ]] ; then +if [[ ! -f /etc/letsencrypt/live/${SERVER_NAME}/fullchain.pem || ! -f /etc/letsencrypt/live/${SERVER_ALIAS}/fullchain.pem ]] ; then certbot certonly --standalone --non-interactive -d ${SERVER_NAME} certbot certonly --standalone --non-interactive -d ${SERVER_ALIAS} else