[LON-CAPA-cvs] cvs: loncom /build CHECKRPMS

raeburn raeburn at source.lon-capa.org
Mon Oct 17 15:11:42 EDT 2011


raeburn		Mon Oct 17 19:11:42 2011 EDT

  Modified files:              
    /loncom/build	CHECKRPMS 
  Log:
  - Write a copy of message body to /home/httpd/html/lon-status/checkrpms.txt for
    use by clusterstatus.pl.
  
  
Index: loncom/build/CHECKRPMS
diff -u loncom/build/CHECKRPMS:1.13 loncom/build/CHECKRPMS:1.14
--- loncom/build/CHECKRPMS:1.13	Fri May 13 00:21:45 2011
+++ loncom/build/CHECKRPMS	Mon Oct 17 19:11:42 2011
@@ -3,7 +3,7 @@
 # The LearningOnline Network with CAPA
 # Checks status of RPM packages on system.
 #
-# $Id: CHECKRPMS,v 1.13 2011/05/13 00:21:45 raeburn Exp $
+# $Id: CHECKRPMS,v 1.14 2011/10/17 19:11:42 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -63,6 +63,7 @@
 
 my $tmpfile = '/tmp/CHECKRPMS.'.$$;
 my $perlvar= LONCAPA::Configuration::read_conf('loncapa.conf');
+my $docroot = $perlvar->{'lonDocRoot'};
 
 # Determine who we email
 my $defdom = $perlvar->{'lonDefDomain'};
@@ -142,6 +143,9 @@
 }
 if ($send) {
     $subj .= $addsubj;
+    if ($docroot ne '') {
+        system("cat $tmpfile > $docroot/lon-status/checkrpms.txt");
+    }
     system(qq{mail -s '$subj' "$emailto" < $tmpfile});
 }
 




More information about the LON-CAPA-cvs mailing list