Removed duplicate check outputs

This commit is contained in:
Lord Hepipud 2019-07-19 20:00:55 +02:00
parent 7fd9f35de0
commit 99825a4a57

View file

@ -60,21 +60,18 @@ function New-IcingaCheckPackage()
$this.GetWorstExitCode();
$this.exitcode = $IcingaEnums.IcingaExitCode.Critical;
} else {
$this.WriteAllOutput();
$this.exitcode = $IcingaEnums.IcingaExitCode.Ok;
}
} elseif([int]$this.opmin -ne -1) {
if ($this.CheckMinimumOk() -eq $FALSE) {
$this.GetWorstExitCode();
} else {
$this.WriteAllOutput();
$this.exitcode = $IcingaEnums.IcingaExitCode.Ok;
}
} elseif([int]$this.opmax -ne -1) {
if ($this.CheckMaximumOk() -eq $FALSE) {
$this.GetWorstExitCode();
} else {
$this.WriteAllOutput();
$this.exitcode = $IcingaEnums.IcingaExitCode.Ok;
}
}