projects
/
dovecot-cn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6d20140
)
izmjene u postinstu za mkcert.sh
author
Ivan Rako
<irako@nekkar.carnet.hr>
Tue, 9 May 2017 13:49:15 +0000
(15:49 +0200)
committer
Ivan Rako
<irako@nekkar.carnet.hr>
Tue, 9 May 2017 13:49:15 +0000
(15:49 +0200)
debian/postinst
patch
|
blob
|
history
diff --git
a/debian/postinst
b/debian/postinst
index
4cc3cb3
..
0d75081
100755
(executable)
--- a/
debian/postinst
+++ b/
debian/postinst
@@
-47,8
+47,10
@@
cp_check_and_sed 'ssl = no' \
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 ! 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
+ 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 = </etc/dovecot/dovecot.pem' \
's|#ssl_cert = </etc/dovecot/dovecot.pem|ssl_cert = </etc/dovecot/dovecot.pem|g' \
cp_check_and_sed '#ssl_cert = </etc/dovecot/dovecot.pem' \
's|#ssl_cert = </etc/dovecot/dovecot.pem|ssl_cert = </etc/dovecot/dovecot.pem|g' \