mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
added error messages to letsencrypt on startup (#898)
This commit is contained in:
parent
570237232c
commit
68aaeba59f
|
@ -790,6 +790,8 @@ function _setup_ssl() {
|
|||
KEY="privkey"
|
||||
elif [ -e "/etc/letsencrypt/live/$HOSTNAME/key.pem" ]; then
|
||||
KEY="key"
|
||||
else
|
||||
notify 'err' "Cannot access '/etc/letsencrypt/live/"$HOSTNAME"/privkey.pem' nor 'key.pem'"
|
||||
fi
|
||||
if [ -n "$KEY" ]; then
|
||||
notify 'inf' "Adding $HOSTNAME SSL certificate"
|
||||
|
@ -803,7 +805,11 @@ function _setup_ssl() {
|
|||
sed -i -e 's~ssl_key = </etc/dovecot/ssl/dovecot\.key~ssl_key = </etc/letsencrypt/live/'$HOSTNAME'/'"$KEY"'\.pem~g' /etc/dovecot/conf.d/10-ssl.conf
|
||||
|
||||
notify 'inf' "SSL configured with 'letsencrypt' certificates"
|
||||
else
|
||||
notify 'err' "Key filename not set!"
|
||||
fi
|
||||
else
|
||||
notify 'err' "Cannot access '/etc/letsencrypt/live/"$HOSTNAME"/fullchain.pem'"
|
||||
fi
|
||||
;;
|
||||
"custom" )
|
||||
|
|
Loading…
Reference in a new issue