git://git.exim.org
/
buildfarm-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add support for Storable frozen config and git head ref
[buildfarm-server.git]
/
trunk
/
bf-alerts.pl
diff --git
a/trunk/bf-alerts.pl
b/trunk/bf-alerts.pl
index c118cc4e29ff4739fb4fba1c3216d9576e942723..1b9dd1a3b611a879a708c4ef969997f2f5c25afe 100755
(executable)
--- a/
trunk/bf-alerts.pl
+++ b/
trunk/bf-alerts.pl
@@
-12,6
+12,7
@@
use Safe;
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
$all_stat $fail_stat $change_stat $green_stat
use vars qw($dbhost $dbname $dbuser $dbpass $dbport
$all_stat $fail_stat $change_stat $green_stat
+ $default_host
);
require "$ENV{BFConfDir}/BuildFarmWeb.pl";
);
require "$ENV{BFConfDir}/BuildFarmWeb.pl";
@@
-193,8
+194,11
@@
my $addr_sth = $db->prepare(q[
my $me = `id -un`; chomp $me;
my $me = `id -un`; chomp $me;
+my $host = `hostname`; chomp ($host);
+$host = $default_host unless ($host =~ m/[.]/ || !defined($default_host));
-my $host = `hostname`; chomp $host;
+my $from_addr = "PG Build Farm <$me\@$host>";
+$from_addr =~ tr /\r\n//d;
@@
-216,7
+220,7
@@
foreach my $clearme (@need_cleared)
}
my $msg = new Mail::Send;
}
my $msg = new Mail::Send;
- $msg->set('From',
"PG Build Farm <$me\@$host>"
);
+ $msg->set('From',
$from_addr
);
$addr_sth->execute($animal);
$addr_sth->execute($animal);
@@
-244,7
+248,7
@@
foreach my $clearme (@need_alerts)
"on $sysbranch->{branch} for $hours hours.";
my $msg = new Mail::Send;
"on $sysbranch->{branch} for $hours hours.";
my $msg = new Mail::Send;
- $msg->set('From',
"PG Build Farm <$me\@$host>"
);
+ $msg->set('From',
$from_addr
);
$addr_sth->execute($animal);
$addr_sth->execute($animal);