Guard chmod at the end.
authorScott Cantor <cantor.2@osu.edu>
Tue, 18 Aug 2009 14:45:03 +0000 (14:45 +0000)
committerScott Cantor <cantor.2@osu.edu>
Tue, 18 Aug 2009 14:45:03 +0000 (14:45 +0000)
configs/keygen.sh

index 0729fe3..5ae60db 100755 (executable)
@@ -66,5 +66,8 @@ else
     openssl req -config sp-cert.cnf -new -x509 -days $DAYS -keyout sp-key.pem -out sp-cert.pem 2> /dev/null
 fi
 
-chmod 600 sp-key.pem
 rm sp-cert.cnf
+
+if  [ -s sp-key.pem ] ; then
+    chmod 600 sp-key.pem
+fi