Add lastBackup check

master
Heuzef 5 years ago
parent 1a98c3b940
commit ea7be3ccb2
  1. 5
      Check.pm

@ -51,9 +51,8 @@ sub action
}
# Age
if ( $Backups[$host]{type} eq "full" or "incr" ) {
$lastAge = sprintf("%.1f", (time - $Backups[-1]{startTime}) / (24 * 3600));
}
my $lastBackup = ( $bpc[-1]->{type} =~ m/^full|incr$/ ) ? -1 : -2;
$lastAge = sprintf("%.1f", (time - $lastBackup{startTime}) / (24 * 3600));
# Color for age
if ( $lastAge < $frequency ) {

Loading…
Cancel
Save