domtool-readdcerts
[hcoop/domtool2.git] / scripts / domtool-addcert
index 3fb6b82..0d23333 100755 (executable)
@@ -6,14 +6,14 @@ if test -z "$USER"; then
        exit 1
 fi   
 
-  KEYDIR=/afs/hcoop.net/common/etc/domtool/keys/$1
+  KEYDIR=/afs/hcoop.net/common/etc/domtool/keys/$USER
  KEYFILE=$KEYDIR/key.pem
-CERTFILE=/afs/hcoop.net/common/etc/domtool/certs/$1.pem
+CERTFILE=/afs/hcoop.net/common/etc/domtool/certs/$USER.pem
   NEWREQ=~/.newreq.pem
      NEW=~/.new.pem
    KEYIN=~/.keyin
 
-mkdir -p $KEYDIR
+mkdir $KEYDIR || echo Key directory already exists.
 openssl genrsa -out $KEYFILE
 chown -R domtool.domtool $KEYDIR
 fs sa $KEYDIR $USER read