mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-24 18:07:20 +00:00
Whitespace cleanup
* remove trailing whitespace * remove empty lines at the end of files
This commit is contained in:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -169,7 +169,7 @@ foreach my $i (sort keys %{$rejects})
|
|||
if (-l $statefile)
|
||||
{
|
||||
die ("$statefile is a symbolic link, refusing to touch it.");
|
||||
}
|
||||
}
|
||||
open (OUT, '>', $statefile) or die "Unable to open statefile: $!\n";
|
||||
print OUT "$pos:$delivered\n";
|
||||
foreach my $i (sort keys %{$rejects})
|
||||
|
@ -178,31 +178,31 @@ foreach my $i (sort keys %{$rejects})
|
|||
}
|
||||
close OUT;
|
||||
|
||||
sub parseLogfile
|
||||
{
|
||||
sub parseLogfile
|
||||
{
|
||||
my ($fname, $start, $stop) = @_;
|
||||
open (LOGFILE, $fname)
|
||||
or die "Unable to open logfile $fname for reading: $!\n";
|
||||
seek (LOGFILE, $start, 0)
|
||||
or die "Unable to seek to $start in $fname: $!\n";
|
||||
|
||||
while (tell (LOGFILE) < $stop)
|
||||
while (tell (LOGFILE) < $stop)
|
||||
{
|
||||
my $line = <LOGFILE>;
|
||||
chomp ($line);
|
||||
|
||||
if ($line =~ /$postfix\/qmgr.*from=.*size=[0-9]*/ ||
|
||||
$line =~ /$postfix\/smtp.* status=sent /)
|
||||
$line =~ /$postfix\/smtp.* status=sent /)
|
||||
{
|
||||
$delivered++;
|
||||
}
|
||||
}
|
||||
elsif ($line =~ /$postfix\/smtpd.*reject: \S+ \S+ \S+ (\S+)/ ||
|
||||
$line =~ /$postfix\/cleanup.* reject: (\S+)/)
|
||||
{
|
||||
$rejects->{$1}++;
|
||||
}
|
||||
}
|
||||
close(LOGFILE) or warn "Error closing $fname: $!\n";
|
||||
close(LOGFILE) or warn "Error closing $fname: $!\n";
|
||||
}
|
||||
|
||||
# vim:syntax=perl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue