From 0fc88178b9cf5eaa6d810daa9b0c764810ecdfa6 Mon Sep 17 00:00:00 2001 From: Heuzef Date: Wed, 30 Oct 2019 14:34:22 +0100 Subject: [PATCH] move var --- Check.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Check.pm b/Check.pm index 1458a38..c95987b 100644 --- a/Check.pm +++ b/Check.pm @@ -99,7 +99,9 @@ sub action if ( $Backups[-4] ) { # There are enough backup ? my $toobig = 0; my $toosmall = 0; - + my $sizeConsistencyColor = "Tomato"; + my $sizeConsistency = "ANOMALOUS"; + # TOO BIG ? If the size is 6 times higher than usual : if ( $new_size > ($new_size_q3 + $new_size_q3 - $new_size_q1) * 1.5 or $new_size > $new_size_avg * 6 ) { $toobig = 1; @@ -111,13 +113,12 @@ sub action } # Get result - my $sizeConsistencyColor = "Tomato"; - my $sizeConsistency = "ANOMALOUS"; if ( not $toobig and not $toosmall ) { $sizeConsistencyColor = "MediumSeaGreen"; $sizeConsistency = "Normal"; } - } else { + } + else { my $sizeConsistencyColor = "MediumSeaGreen"; my $sizeConsistency = "Not enough backups"; }