Use the environment var SSL_DOMAIN while extracting certs from the acme.json during start-up

Signed-off-by: Brandon Schmitt <Brandon.Schmitt@live.de>
This commit is contained in:
Brandon Schmitt 2020-12-06 20:36:22 +01:00
parent 6251f898ea
commit c020cc88a1
No known key found for this signature in database
GPG key ID: F34558B1EBBD662B

View file

@ -1095,7 +1095,7 @@ function _setup_ssl
local LETSENCRYPT_DOMAIN=""
local LETSENCRYPT_KEY=""
[[ -f /etc/letsencrypt/acme.json ]] && (_extract_certs_from_acme "${HOSTNAME}" || _extract_certs_from_acme "${DOMAINNAME}")
[[ -f /etc/letsencrypt/acme.json ]] && (_extract_certs_from_acme "${SSL_DOMAIN}" || _extract_certs_from_acme "${HOSTNAME}" || _extract_certs_from_acme "${DOMAINNAME}")
# first determine the letsencrypt domain by checking both the full hostname or just the domainname if a SAN is used in the cert
if [[ -e /etc/letsencrypt/live/${HOSTNAME}/fullchain.pem ]]