* Safer handling of $1 in all scripts
[hcoop/domtool2.git] / scripts / domtool-rmuser
index a296a3a..941fc1f 100755 (executable)
@@ -1,5 +1,12 @@
 #!/bin/sh -e
 
-rm -rf /afs/hcoop.net/common/etc/domtool/keys/$1
-rm /afs/hcoop.net/common/etc/domtool/certs/$1.pem
-domtool-admin rmuser $1
+USER="$1"
+
+if test -z "$USER"; then
+       echo Usage: domtool-rmuser USERNAME
+       exit 1
+fi
+
+rm -rf /afs/hcoop.net/common/etc/domtool/keys/$USER
+rm /afs/hcoop.net/common/etc/domtool/certs/$USER.pem
+domtool-admin rmuser $USER