X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=dovecot-cn.git;a=blobdiff_plain;f=debian%2Fpostinst;h=4cc3cb336e4d205441966b7399407592386a58ec;hp=ad23302dea3eca8fdef943a5dbfa0ada07c421db;hb=6d2014011d422a5cd4d0a4de254a000a5e7a84ec;hpb=6dc17094b6fc20a9b486d97ab393523c76a79f69 diff --git a/debian/postinst b/debian/postinst index ad23302..4cc3cb3 100755 --- a/debian/postinst +++ b/debian/postinst @@ -44,6 +44,22 @@ 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 + + echo "CN: Generating certificate and key..." + /usr/share/dovecot-cn/mkcert.sh > /dev/null + + cp_check_and_sed '#ssl_cert =