From c020cc88a15e45431b71aea039337119d2aec6d8 Mon Sep 17 00:00:00 2001 From: Brandon Schmitt Date: Sun, 6 Dec 2020 20:36:22 +0100 Subject: [PATCH] Use the environment var SSL_DOMAIN while extracting certs from the acme.json during start-up Signed-off-by: Brandon Schmitt --- target/start-mailserver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/start-mailserver.sh b/target/start-mailserver.sh index 9cb951b0..293208b9 100755 --- a/target/start-mailserver.sh +++ b/target/start-mailserver.sh @@ -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 ]]