mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-05-30 01:17:48 +02:00
Refactor bash [[ ... ]] && ... || ... into if then else
This commit is contained in:
parent
c020cc88a1
commit
ad4d4cc794
@ -1095,7 +1095,16 @@ function _setup_ssl
|
||||
local LETSENCRYPT_DOMAIN=""
|
||||
local LETSENCRYPT_KEY=""
|
||||
|
||||
[[ -f /etc/letsencrypt/acme.json ]] && (_extract_certs_from_acme "${SSL_DOMAIN}" || _extract_certs_from_acme "${HOSTNAME}" || _extract_certs_from_acme "${DOMAINNAME}")
|
||||
if [[ -f /etc/letsencrypt/acme.json ]]
|
||||
then
|
||||
if ! _extract_certs_from_acme "${SSL_DOMAIN}"
|
||||
then
|
||||
if ! _extract_certs_from_acme "${HOSTNAME}"
|
||||
then
|
||||
_extract_certs_from_acme "${DOMAINNAME}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# 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 ]]
|
||||
|
Loading…
x
Reference in New Issue
Block a user