summaryrefslogtreecommitdiffstats
path: root/scripts/lunasa-del3.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lunasa-del3.sh')
-rwxr-xr-xscripts/lunasa-del3.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/lunasa-del3.sh b/scripts/lunasa-del3.sh
new file mode 100755
index 0000000..39240d9
--- /dev/null
+++ b/scripts/lunasa-del3.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+password="`cat lunasa.txt`"
+
+for id in "$@"
+do
+ echo "Deleting id $id..."
+
+ /usr/safenet/lunaclient/bin/cmu list -display handle,class -id $id -password $password | while read cert
+ do
+ class=$(echo $cert | cut -d' ' -f2 | cut -d= -f2)
+ handle=$(echo $cert | cut -d' ' -f1 | cut -d= -f2)
+ echo " - $class: $handle"
+
+ /usr/safenet/lunaclient/bin/cmu delete -handle $handle -force -password $password
+ done
+done