Check default domain name is more than zero length
This commit is contained in:
parent
49f0bfa3fd
commit
f2f72193b8
|
@ -762,12 +762,14 @@ function update_default_domain {
|
|||
fi
|
||||
|
||||
if [ -d /etc/dovecot ]; then
|
||||
if [ ${#DEFAULT_DOMAIN_NAME} -gt 0 ]; then
|
||||
if ! grep -q "ssl_cert = </etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.pem" /etc/dovecot/conf.d/10-ssl.conf; then
|
||||
sed -i "s|#ssl_cert =.*|ssl_cert = </etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.pem|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||
sed -i "s|ssl_cert =.*|ssl_cert = </etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.pem|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||
systemctl restart dovecot
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d /etc/matrix-synapse ]; then
|
||||
cp /etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.pem /etc/matrix-synapse/homeserver.tls.crt
|
||||
|
|
Loading…
Reference in New Issue