bin/*: Use plain `/usr/bin/tclsh' in shebang lines.
[ca] / bin / add
diff --git a/bin/add b/bin/add
index 6bd128b..cb4ecf0 100755 (executable)
--- a/bin/add
+++ b/bin/add
@@ -1,4 +1,4 @@
-#! /usr/bin/tclsh8.5
+#! /usr/bin/tclsh
 ### -*-tcl-*-
 ###
 ### Insert a certificate request into the database.
@@ -70,7 +70,7 @@ db transaction {
 
     ## Check whether the profile exists.
     if {![db exists {
-      SELECT 1 FROM profile WHERE label = $profile;
+      SELECT 1 FROM profile WHERE label = $profile AND tombstone = 0;
     }]} {
       error "unknown profile `$profile'"
     }
@@ -109,3 +109,6 @@ db transaction {
   ## Issue a shiny new certificate.
   issue-cert $id [now]
 }
+
+## Publish any necessary changes.
+update-hook