aboutsummaryrefslogtreecommitdiffstats
path: root/main/dovecot/dovecot.post-install
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-09-06 06:44:18 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-09-06 06:44:18 +0000
commit3bea9d5e13f8f936fdc61aca3c65b4959ee02fb6 (patch)
tree82ee0486779e0833efbabe865dd7a53729d354e0 /main/dovecot/dovecot.post-install
parent9182e0aaa8525bdd3e3fcb81f3b1a1243ec8014c (diff)
downloadaports-3bea9d5e13f8f936fdc61aca3c65b4959ee02fb6.tar.bz2
aports-3bea9d5e13f8f936fdc61aca3c65b4959ee02fb6.tar.xz
main/dovecot: enable ssl and create self-signed cert on install
fixes #667
Diffstat (limited to 'main/dovecot/dovecot.post-install')
-rw-r--r--main/dovecot/dovecot.post-install4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/dovecot/dovecot.post-install b/main/dovecot/dovecot.post-install
index e4d6bb281b..c014fcbb47 100644
--- a/main/dovecot/dovecot.post-install
+++ b/main/dovecot/dovecot.post-install
@@ -3,7 +3,7 @@
# based on doc/mkcert.sh
# if ssl disabled then lets just exit
-doveconf ssl | grep -q 'yes' || exit 0
+doveconf ssl 2>/dev/null | grep -q 'yes' || exit 0
# Generates a self-signed certificate.
OPENSSL=${OPENSSL-openssl}
@@ -25,7 +25,7 @@ fi
# check if we have ssl_cert and/or key (for dovecot-2.0+)
# try expand the cert/key itself and if found, lets just keep it
[ -n "$(doveconf -x ssl_cert 2>/dev/null)" ] && exit 0
-[ -n "$(doveconf -x ssl_cert 2>/dev/null)" ] && exit 0
+[ -n "$(doveconf -x ssl_key 2>/dev/null)" ] && exit 0
[ -z "$ssl_cert_file" ] && ssl_cert_file=$(doveconf ssl_cert | sed 's/.*= <//')
[ -z "$ssl_key_file" ] && ssl_key_file=$(doveconf ssl_key | sed 's/.*= <//')