From a9721b0c36acd6196ab0e9d403cb83cbe50c7dd9 Mon Sep 17 00:00:00 2001 From: Heuzef Date: Fri, 4 Oct 2019 15:39:59 +0200 Subject: [PATCH] fix indentation --- Check.pm | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/Check.pm b/Check.pm index f68f7da..9efe4ac 100644 --- a/Check.pm +++ b/Check.pm @@ -112,30 +112,29 @@ sub action # If Backup is disable if ( $Conf{BackupsDisable} == 1 ) { - if ( $Status{$host}{state} ne "Status_backup_in_progress" - && $Status{$host}{state} ne "Status_restore_in_progress" ) { - $reasonHilite = $Conf{CgiStatusHilightColor}{Disabled_OnlyManualBackups}; - $tempState = "Disabled_OnlyManualBackups"; - $tempReason = ""; - } else { - $tempState = $Status{$host}{state}; - $tempReason = $Status{$host}{reason}; - } - } elsif ($Conf{BackupsDisable} == 2 ) { - $reasonHilite = $Conf{CgiStatusHilightColor}{Disabled_AllBackupsDisabled}; - $tempState = "Disabled_AllBackupsDisabled"; - $tempReason = ""; - } else { - $tempState = $Status{$host}{state}; - $tempReason = $Status{$host}{reason}; - } - $reasonHilite = " bgcolor=\"$reasonHilite\"" if ( $reasonHilite ne "" ); - if ( $tempState ne "Status_backup_in_progress" - && $tempState ne "Status_restore_in_progress" - && $Conf{BackupsDisable} == 0 - && $Status{$host}{error} ne "" ) { - ($shortErr = $Status{$host}{error}) =~ s/(.{48}).*/$1.../; - $shortErr = " ($shortErr)"; + if ( $Status{$host}{state} ne "Status_backup_in_progress" && $Status{$host}{state} ne "Status_restore_in_progress" ) { + $reasonHilite = $Conf{CgiStatusHilightColor}{Disabled_OnlyManualBackups}; + $tempState = "Disabled_OnlyManualBackups"; + $tempReason = ""; + } else { + $tempState = $Status{$host}{state}; + $tempReason = $Status{$host}{reason}; + } +} elsif ($Conf{BackupsDisable} == 2 ) { + $reasonHilite = $Conf{CgiStatusHilightColor}{Disabled_AllBackupsDisabled}; + $tempState = "Disabled_AllBackupsDisabled"; + $tempReason = ""; +} else { + $tempState = $Status{$host}{state}; + $tempReason = $Status{$host}{reason}; +} +$reasonHilite = " bgcolor=\"$reasonHilite\"" if ( $reasonHilite ne "" ); + if ( $tempState ne "Status_backup_in_progress" + && $tempState ne "Status_restore_in_progress" + && $Conf{BackupsDisable} == 0 + && $Status{$host}{error} ne "" ) { + ($shortErr = $Status{$host}{error}) =~ s/(.{48}).*/$1.../; + $shortErr = " ($shortErr)"; } # Check Size Consistency