Merge branch 'master' of git://git.distorted.org.uk/~mdw/ca
[ca] / bin / withdraw
index ed6e740..4f67086 100755 (executable)
 ## Find the common utilities.
 source [file join [file dirname $argv0] "../lib/func.tcl"]
 
+## Open the database
+sqlite3 db "$CERTROOT/state/ca.db"
+db nullvalue nil
+cd "$CERTROOT"
+
 ## Get the list of requests.
 if {[llength $argv] != 1} {
-  puts stderr "Usage: $QUIS REQID"
+  puts stderr "usage: $QUIS REQID"
   exit 1
 }
 lassign $argv reqid