[csw-devel] SF.net SVN: opencsw:[418] catalog_signatures/bin/catalog_daemon

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Thu Jul 21 05:05:23 CEST 2011


Revision: 418
          http://opencsw.svn.sourceforge.net/opencsw/?rev=418&view=rev
Author:   bdwalton
Date:     2011-07-21 03:05:23 +0000 (Thu, 21 Jul 2011)

Log Message:
-----------
add a script to fire up the webrick daemon under gpg agent

Signed-off-by: Ben Walton <bwalton at opencsw.org>

Added Paths:
-----------
    catalog_signatures/bin/catalog_daemon

Added: catalog_signatures/bin/catalog_daemon
===================================================================
--- catalog_signatures/bin/catalog_daemon	                        (rev 0)
+++ catalog_signatures/bin/catalog_daemon	2011-07-21 03:05:23 UTC (rev 418)
@@ -0,0 +1,29 @@
+#!/opt/csw/bin/bash
+
+PATH=/opt/csw/bin:/opt/csw/gnu:$PATH
+
+DAEMON_BIN="$(dirname $0)"
+DAEMON_HOME="${DAEMON_BIN}/.."
+DAEMON_GPG="${DAEMON_HOME}/gpg"
+DAEMON_TMP="${DAEMON_HOME}/tmp"
+GPG_ENV="${DAEMON_TMP}/gpg-agent.conf"
+DAEMON=${DAEMON_BIN}/catalog_gpg
+
+if [ -f "${GPG_ENV}" ]; then
+    source "${GPG_ENV}"
+    if [ ! -d "$(dirname ${GPG_AGENT_INFO})" ]; then
+	unset GPG_AGENT_INFO
+    fi
+fi
+
+if [ -z "${GPG_AGENT_INFO}" ]; then
+    gpg-agent --daemon --homedir "${DAEMON_GPG}" --write-env-file "${GPG_ENV}"
+    source "${GPG_ENV}"
+fi
+
+export GPG_AGENT_INFO
+
+# warm up the passphrase...
+gpg --yes --homedir "${DAEMON_GPG}" --clearsign --armor --output "${DAEMON_TMP}/$(basename ${DAEMON}).asc" "${DAEMON}"
+
+exec "${DAEMON}"


Property changes on: catalog_signatures/bin/catalog_daemon
___________________________________________________________________
Added: svn:executable
   + *


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list