X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;ds=sidebyside;f=debian%2Fpostinst;h=2afcf7adf1dd1f0b8a7f6cb808f77cd7ff83eb7b;hb=cd070e8b8eb8f3b9e6fcd42b5b66033a004bb5e6;hp=b3892be04065bc442f9a8acc4082ae81e95008b6;hpb=4151f5bf79d6b4d91a3c8bcbae22b2aee81fa077;p=dovecot-cn.git diff --git a/debian/postinst b/debian/postinst index b3892be..2afcf7a 100755 --- a/debian/postinst +++ b/debian/postinst @@ -39,6 +39,34 @@ cp_check_and_sed '#ssl =' \ 's/^#ssl =/ssl =/g' \ /etc/dovecot/conf.d/10-ssl.conf || true +# trazio zelja +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 || true + fi + + cp_check_and_sed '#ssl_cert =