X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=0d75081e6f8a19364e9e36ffca65b9a6ce3c52fe;hb=d78f12c6bd8a4ec6ef0eee12dd9a8551fd57766f;hp=ad23302dea3eca8fdef943a5dbfa0ada07c421db;hpb=6dc17094b6fc20a9b486d97ab393523c76a79f69;p=dovecot-cn.git diff --git a/debian/postinst b/debian/postinst index ad23302..0d75081 100755 --- a/debian/postinst +++ b/debian/postinst @@ -44,6 +44,24 @@ cp_check_and_sed 'ssl = no' \ 's/^ssl = no/ssl = yes/g' \ /etc/dovecot/conf.d/10-ssl.conf || true +if ! grep -q ^ssl_cert /etc/dovecot/conf.d/10-ssl.conf \ + && ! grep -q ^ssl_key /etc/dovecot/conf.d/10-ssl.conf; then + + if [ ! -f /etc/dovecot/dovecot.pem -a ! -f /etc/dovecot/private/dovecot.pem ]; then + echo "CN: Generating certificate and key..." + /usr/share/dovecot-cn/mkcert.sh 2>&1 > /dev/null + fi + + cp_check_and_sed '#ssl_cert =