Add 4.97+security
[buildfarm-server.git] / bf-alerts.pl
index 09ac2c23211c156fe29b070947353f9266c8355d..c038f963b0b6fd76bdb1239e8be6104cb7017c01 100755 (executable)
@@ -23,7 +23,9 @@ use vars qw($dbhost $dbname $dbuser $dbpass $dbport
        $default_host
 );
 
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/BuildFarmWeb.pl";
 
 die "no dbname" unless $dbname;
 die "no dbuser" unless $dbuser;
@@ -198,7 +200,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;
 
 
@@ -232,7 +234,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;
@@ -261,7 +263,7 @@ foreach my $needme (@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";