diff doc/mkcert.sh @ 4342:b668848fff11 HEAD

If cert/key directories don't exist, exit immediately instead of just priting the errors.
author Timo Sirainen <tss@iki.fi>
date Fri, 16 Jun 2006 12:23:15 +0300
parents 080ac35855d5
children 46990210b870
line wrap: on
line diff
--- a/doc/mkcert.sh	Fri Jun 16 12:22:57 2006 +0300
+++ b/doc/mkcert.sh	Fri Jun 16 12:23:15 2006 +0300
@@ -7,15 +7,20 @@
 SSLDIR=${SSLDIR-/etc/ssl}
 OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf}
 
-CERTFILE=$SSLDIR/certs/dovecot.pem
-KEYFILE=$SSLDIR/private/dovecot.pem
+CERTDIR=$SSLDIR/certs
+KEYDIR=$SSLDIR/private
 
-if [ ! -d $SSLDIR/certs ]; then
+CERTFILE=$CERTDIR/dovecot.pem
+KEYFILE=$KEYDIR/dovecot.pem
+
+if [ ! -d $CERTDIR ]; then
   echo "$SSLDIR/certs directory doesn't exist"
+  exit 1
 fi
 
-if [ ! -d $SSLDIR/private ]; then
+if [ ! -d $KEYDIR ]; then
   echo "$SSLDIR/private directory doesn't exist"
+  exit 1
 fi
 
 if [ -f $CERTFILE ]; then