diff --git a/Check.pm b/Check.pm index 6573a4c..7155657 100644 --- a/Check.pm +++ b/Check.pm @@ -73,6 +73,11 @@ sub action } else { $lastAge = sprintf("%.1f", (time - $lastAge) / (24 * 3600)); } + if ( $lastAge < 1.1 ) { + $lastAgeColor = "MediumSeaGreen"; + } else { + $lastAgeColor = "Tomato"; + } if ( $fullAge < 0 ) { $fullAge = ""; $fullRate = ""; @@ -119,11 +124,6 @@ sub action ($shortErr = $Status{$host}{error}) =~ s/(.{48}).*/$1.../; $shortErr = " ($shortErr)"; } - if ( $lastAge < 1.1 ) { - $lastAgeColor = "MediumSeaGreen"; - } else { - $lastAgeColor = "Tomato"; - } $str = <${HostLink($host)}