From c6754da9767147cef7d98d830e134b5ae0f6b6e8 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 26 Feb 2018 11:40:38 +0100 Subject: [PATCH] Fix warning when nigthly process is running --- check_backuppc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_backuppc b/check_backuppc index 146caf5..da7cc17 100755 --- a/check_backuppc +++ b/check_backuppc @@ -221,7 +221,7 @@ if ( $statusCode eq 'OK' ) { next if (@hostsExcluded and grep {/^$host$/} @hostsExcluded); next if ( $Status{$host}{BackupsDisable} ); next if ($Status{$host}{'type'} eq 'archive'); - if ( $Status{$host}{statusCode} ne 'OK' ) { + if ( $Status{$host}{statusCode} && $Status{$host}{statusCode} ne 'OK' ) { $statusMsg .= ", " unless ( $first_host ); $statusMsg .= "$host: ".$Status{$host}{statusCode}." - ".$Status{$host}{statusMsg}; $first_host = 0 if ( $first_host );