Check default domain name is more than zero length
This commit is contained in:
parent
49f0bfa3fd
commit
f2f72193b8
|
@ -762,10 +762,12 @@ function update_default_domain {
|
|||
fi
|
||||
|
||||
if [ -d /etc/dovecot ]; 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
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue