[csw-devel] SF.net SVN: opencsw:[516] catalog_signatures/bin/passphrase_verify

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Sat Aug 27 02:23:21 CEST 2011


Revision: 516
          http://opencsw.svn.sourceforge.net/opencsw/?rev=516&view=rev
Author:   bdwalton
Date:     2011-08-27 00:23:21 +0000 (Sat, 27 Aug 2011)
Log Message:
-----------
send a mail notice when the passphrase is reset too as multiple eyes will see the first mail

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

Modified Paths:
--------------
    catalog_signatures/bin/passphrase_verify

Modified: catalog_signatures/bin/passphrase_verify
===================================================================
--- catalog_signatures/bin/passphrase_verify	2011-08-27 00:13:21 UTC (rev 515)
+++ catalog_signatures/bin/passphrase_verify	2011-08-27 00:23:21 UTC (rev 516)
@@ -8,6 +8,11 @@
     gpg --yes --batch --homedir "${APP_GPG}" --clearsign --armor --output "${APP_TMP}/$(basename ${APP_DAEMON}).asc" "${APP_DAEMON}"
 
     if [ $? -eq 0 ]; then
+	if [ -f "${APP_TMP}/human_has_arrived" ]; then
+	    echo "A human has intervened and restored the passphrase." | mail -s '[CSW Notice] Catalog Signature Daemon has been reset' ${APP_MAILTO}
+	    rm -f "${APP_TMP}/human_has_arrived"
+	fi
+
 	echo "$(date +%c): Checking; Ok."
 	sleep 60
     else
@@ -17,5 +22,6 @@
 	echo "$(date +%c): AHA!  The passphrase has expired...[Mail sent.]"
 	echo "$(date +%c): Press ENTER to continue monitoring."
 	read CONT
+	touch "${APP_TMP}/human_has_arrived"
     fi
 done

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