From 4e0293199b81a2fbdd881d74d7fe60a323254602 Mon Sep 17 00:00:00 2001 From: Heuzef Date: Fri, 11 Oct 2019 16:43:43 +0200 Subject: [PATCH] declare $bpc out of loop --- Check.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Check.pm b/Check.pm index bb7a8f6..8d49486 100644 --- a/Check.pm +++ b/Check.pm @@ -27,15 +27,14 @@ sub action { # Init my($str, $strGood, $header); - GetStatusInfo("hosts info"); my $Privileged = CheckPermission(); + my $bpc = BackupPC::Lib->new(); # Start loop foreach my $host ( GetUserHosts(1) ) { my($incrAge, $reasonHilite, $frequency, $lastAge, $lastAgeColor, $tempState, $tempReason, $lastXferErrors, $lastXferErrorsColor); my($shortErr); - my $bpc = BackupPC::Lib->new(); my @Backups = $bpc->BackupInfoRead($host); my $fullAge = $incrAge = $lastAge = -1;