Skip to content

Commit

Permalink
Fixes config writer publishing invalid Icinga plain config
Browse files Browse the repository at this point in the history
  • Loading branch information
LordHepipud committed Aug 7, 2023
1 parent e2bd207 commit bdfd88e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/core/tools/Get-IcingaCheckCommandConfig.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,11 @@ function Write-IcingaPlainConfigurationFiles()
$AddNewLine = $FALSE;
}
[string]$Value = $CheckCommand.vars[$var];
$IcingaConfig += [string]::Format(' vars.{0} = {1}{2}', $var, $Value.ToLower(), (New-IcingaNewLine));
if ($CheckCommand.vars[$var] -Is [bool]) {
$IcingaConfig += [string]::Format(' vars.{0} = {1}{2}', $var, $Value.ToLower(), (New-IcingaNewLine));
} else {
$IcingaConfig += [string]::Format(' vars.{0} = "{1}"{2}', $var, $Value.ToLower(), (New-IcingaNewLine));
}
}
}
} else {
Expand Down

0 comments on commit bdfd88e

Please sign in to comment.