From 1e30357cc36af656e36894642eae411224120c9e Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 17 Dec 2021 10:36:18 +0100 Subject: [PATCH] Exclude only hosts when BackupsDisable == 2 BackupsDisable equal to 1 mean backup could always be done manually. --- check_backuppc | 2 +- check_backuppc_du | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/check_backuppc b/check_backuppc index ccc1d22..8d116be 100755 --- a/check_backuppc +++ b/check_backuppc @@ -151,7 +151,7 @@ foreach my $host (sort(keys(%Status))) next if (@ownerOnly and not grep {/$owner/} @ownerOnly); my %host_conf = %{$server->ConfigDataRead($host)}; $Status{$host}{BackupsDisable} = $host_conf{BackupsDisable}; - next if ( $Status{$host}{BackupsDisable} and not $forceCheckOnDisabledHosts); + next if ( $Status{$host}{BackupsDisable} eq 2 and not $forceCheckOnDisabledHosts); next if (@hostsDesired and not grep {/^$host$/} @hostsDesired); next if (@hostsExcluded and grep {/^$host$/} @hostsExcluded); next if ($Status{$host}{'type'} eq 'archive'); diff --git a/check_backuppc_du b/check_backuppc_du index f9e6464..ccc458c 100755 --- a/check_backuppc_du +++ b/check_backuppc_du @@ -122,7 +122,7 @@ foreach my $hostname ( sort(keys %Status) ) { my %HostStatus = %{$Status{$hostname}}; my %host_conf = %{$server->ConfigDataRead($hostname)}; $HostStatus{BackupsDisable} = $host_conf{BackupsDisable}; - next if ( $HostStatus{BackupsDisable} ); + next if ( $HostStatus{BackupsDisable} eq 2); next if ($HostStatus{'type'} eq 'archive'); $host_count++;