Browse Source

run certbot if either cert is missing

tags/v0.8.0
Jonathan Cobb 4 years ago
parent
commit
5746143180
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      automation/roles/nginx/files/init_certbot.sh

+ 1
- 1
automation/roles/nginx/files/init_certbot.sh View File

@@ -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 certbot register --agree-tos -m "${LE_EMAIL}" --non-interactive
fi 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_NAME}
certbot certonly --standalone --non-interactive -d ${SERVER_ALIAS} certbot certonly --standalone --non-interactive -d ${SERVER_ALIAS}
else else


Loading…
Cancel
Save