chiark / gitweb /
Add an `update-hook' configuration tweak.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 1 Dec 2012 13:52:31 +0000 (13:52 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 1 Dec 2012 13:52:31 +0000 (13:52 +0000)
This is for publishing the archive to a web server or similar.

bin/update
etc/config.tcl
lib/func.tcl

index bc6841072b1ea1a0ea8d408cc165c17b42cb038d..09a4c600a664e220a75499e27babdee9b126e2b6 100755 (executable)
@@ -53,4 +53,7 @@ exec openssl ca -config "etc/openssl.conf" -updatedb 2>@1
 exec openssl ca -config "etc/openssl.conf" -gencrl | \
     openssl crl -text -out "crl" 2>@1
 
+## Call the user hook.
+update-hook
+
 ###----- That's all, folks --------------------------------------------------
index 8192461cc3b659b0c999012be529639b53b13f0f..c47151844db7ae0e496a439b4f0df629923f839f 100644 (file)
@@ -17,3 +17,7 @@ set P(tls-server) {
   start-skew 1
   expire-interval 28
 }
+
+proc update-hook {} {
+  exec rsync -av --delete-after crl ca.cert cert req test/publish 2>@stderr
+}
index ece7e5ba8336f81e2f9070921e1c62d48ea67e9d..04bd20683ed014e665cc764df8ef769344b17ef5 100644 (file)
@@ -86,6 +86,11 @@ array unset P
 set C(ca-period) 3650
 set C(archive-interval) 32
 
+## The update hook function.
+proc update-hook {} {
+  ## Called by `bin/update': might publish data to a web server, for example.
+}
+
 ## Read the user configuration.
 if {[file exists "$CERTROOT/etc/config.tcl"]} {
   source "$CERTROOT/etc/config.tcl"