--- loncom/CrGenerate.pl 2004/07/01 10:58:29 1.5 +++ loncom/CrGenerate.pl 2004/07/02 09:43:40 1.6 @@ -2,7 +2,7 @@ # The LearningOnline Network # CrGenerate - Generate a loncapa certificate request. # -# $Id: CrGenerate.pl,v 1.5 2004/07/01 10:58:29 foxr Exp $ +# $Id: CrGenerate.pl,v 1.6 2004/07/02 09:43:40 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -48,6 +48,7 @@ # Import section: use strict; +use lib '/home/httpd/lib/perl'; use MIME::Entity; use LONCAPA::Configuration; use File::Copy; @@ -409,7 +410,23 @@ sub MailRequest { Debug("Done"); } -sub Cleanup {} + +# +# Cleans up the detritus that's been created by this +# script (see Implicit inputs below). +# Implicit inputs: +# request.pem - Name of certificate request file in PEM format +# which will be deleted. +# request.txt - Name of textual equivalent of request file +# which will also be deleted. +# hostkey.pem - Encrypted host key which will be deleted. +# hostkey.dec - Decoded host key, which will be deleted. +# +sub Cleanup { + Debug("Cleaning up generated, temporary files"); + unlink("request.pem", "request.txt", "hostkey.pem", "hostkey.dec"); + Debug("done!"); +}