Fix quote symbole

master
Heuzef 5 years ago
parent 83117acb37
commit ec87150122
  1. 10
      zabbix.pl

@ -1,5 +1,5 @@
#!/usr/bin/perl
use lib /usr/share/BackupPC/lib;
use lib "/usr/share/BackupPC/lib";
use BackupPC::Lib;
use BackupPC::CGI::Lib;
use POSIX;
@ -26,7 +26,7 @@ my $lastXferErrors = 0;
my $maxErrors = 0;
for ( my $i = 0 ; $i < @backups ; $i++ ) {
if ( $backups[$i]{type} eq full ) {
if ( $backups[$i]{type} eq "full" ) {
$fullCnt++;
if ( $fullAge < 0 || $backups[$i]{startTime} > $fullAge ) {
$fullAge = $backups[$i]{startTime};
@ -49,10 +49,10 @@ else {
$lastAge = $incrAge;
}
if ( $lastAge < 0 ) {
$lastAge = ;
$lastAge = "";
}
else {
$lastAge = sprintf(%.1f, (time - $lastAge) / (24 * 3600));
$lastAge = sprintf("%.1f", (time - $lastAge) / (24 * 3600));
}
$lastXferErrors = $backups[@backups-1]{xferErrs} if ( @backups );
$maxErrors = $conf->{MaxXferError} if (defined $conf->{MaxXferError});
@ -75,7 +75,7 @@ elsif ($what eq ‘notify’){
print $conf->{EMailNotifyOldBackupDays};
}
else{
print<<EOF;
print<<"EOF";
Usage: $0 <host> [errors|age|size|duration]
EOF

Loading…
Cancel
Save