Generate correct git URL.
[buildfarm-server.git] / bf-alerts.pl
index 232f11ae6946cbcd96449eb295989effeff4317b..8c932103a9b3dcf6859a3d5c72b7c72ea2135670 100755 (executable)
@@ -1,5 +1,13 @@
 #!/usr/bin/perl
 
+=comment
+
+Copyright (c) 2003-2010, Andrew Dunstan
+
+See accompanying License file for license details
+
+=cut 
+
 use strict;
 
 use Digest::SHA1  qw(sha1_hex);
@@ -190,7 +198,7 @@ my $me = `id -un`; chomp $me;
 my $host = `hostname`; chomp ($host);
 $host = $default_host unless ($host =~ m/[.]/ || !defined($default_host));
 
-my $from_addr = "PG Build Farm <$me\@$host>";
+my $from_addr = "Exim BuildFarm <$me\@$host>";
 $from_addr =~ tr /\r\n//d;
 
 
@@ -224,7 +232,7 @@ foreach my $clearme (@need_cleared)
     # $sth->finish;
 
     $msg->to($mailto);
-    $msg->subject("PGBuildfarm member $animal Branch $branch Alert cleared");
+    $msg->subject("Exim BuildFarm member $animal Branch $branch Alert cleared");
     my $fh = $msg->open;
     print $fh "\n\n$text\n"; 
     $fh->close;
@@ -232,9 +240,9 @@ foreach my $clearme (@need_cleared)
     print "alert cleared $animal $branch\n";
 }
 
-foreach my $clearme (@need_alerts)
+foreach my $needme (@need_alerts)
 {
-    my ($sysbranch, $setting) = @$clearme;
+    my ($sysbranch, $setting) = @$needme;
     my ($animal, $branch) = ($sysbranch->{sysname},$sysbranch->{branch});
     my $hours = sprintf("%.2f",($now - $sysbranch->{snapshot}) / 3600);
     my $text = "$sysbranch->{sysname} has not reported " .
@@ -253,7 +261,7 @@ foreach my $clearme (@need_alerts)
 
     $msg->to($mailto);
 
-    $msg->subject("PGBuildfarm member $animal Branch $branch " .
+    $msg->subject("Exim BuildFarm member $animal Branch $branch " .
                  "Alert notification");
     my $fh = $msg->open;
     print $fh "\n\n$text\n";