X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=dovecot-cn.git;a=blobdiff_plain;f=mkcert.sh;h=3689b178cf0374f4fce79d08e0c405bf74357a4f;hp=3cd5a8ab2992880fa6db1f7d0945d847b9f84dd5;hb=HEAD;hpb=a80671d5f813a53e6199cd63c7db8e89ba8c0d87 diff --git a/mkcert.sh b/mkcert.sh index 3cd5a8a..8a38b5f 100755 --- a/mkcert.sh +++ b/mkcert.sh @@ -2,24 +2,24 @@ # Generates a self-signed certificate. # Edit dovecot-openssl.cnf before running this. +# edit by Zeljko Boros umask 077 OPENSSL=${OPENSSL-openssl} SSLDIR=${SSLDIR-/etc/ssl} -OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf} +OPENSSLCONFIG=${OPENSSLCONFIG-/usr/share/dovecot-cn/dovecot-openssl.cnf} -CERTDIR=/etc/dovecot -KEYDIR=/etc/dovecot/private +CERTKEYDIR=/etc/dovecot/private -CERTFILE=$CERTDIR/dovecot.pem -KEYFILE=$KEYDIR/dovecot.pem +CERTFILE=$CERTKEYDIR/dovecot.pem +KEYFILE=$CERTKEYDIR/dovecot.key -if [ ! -d $CERTDIR ]; then +if [ ! -d $CERTKEYDIR ]; then echo "$SSLDIR/certs directory doesn't exist" exit 1 fi -if [ ! -d $KEYDIR ]; then +if [ ! -d $CERTKEYDIR ]; then echo "$SSLDIR/private directory doesn't exist" exit 1 fi