From eef81b45df6641c8758a567a86baad1a49933b42 Mon Sep 17 00:00:00 2001 From: Heuzef Date: Wed, 25 Sep 2019 11:25:27 +0200 Subject: [PATCH] inverse logique for toosmall and toobig --- backuppc_check.pl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/backuppc_check.pl b/backuppc_check.pl index f8f522e..156bc44 100644 --- a/backuppc_check.pl +++ b/backuppc_check.pl @@ -149,25 +149,25 @@ print("Errors : $json->{errors}"); print("\n"); print("Size Consistency : "); -# TOO SMALL ? -my $toosmall = "true"; +# TOO BIG ? +my $toobig = "true"; if ( $json->{new_size} > $json->{new_size_q3} + $json->{new_size_q3} - $json->{new_size_q1} * 1.5 && $json->{new_size} > $json->{new_size_avg} * 6 ) { - $toosmall = "false"; + $toobig = "false"; } else { - $toosmall = "true"; + $toobig = "true"; } -# TOO BIG ? -my $toobig = "true"; +# TOO SMALL ? +my $toosmall = "true"; if ( $json->{new_size} < $json->{new_size_q1} - $json->{new_size_q3} - $json->{new_size_q1} * 1.5 && $json->{new_size} < $json->{new_size_avg} / 3 ) { - $toobig = "false"; + $toosmall = "false"; } else { - $toobig = "true"; + $toosmall = "true"; } # Print result -if ( $toosmall == "false" && $toobig == "false" ) { +if ( $toobig == "false" && $toosmall == "false" ) { print("Normal"); } else {