Fixes empty variable content

This commit is contained in:
Lord Hepipud 2019-11-05 09:43:06 +01:00
parent 9271d7b646
commit 67e2f55802

View file

@ -363,8 +363,12 @@ function Start-IcingaAgentInstallWizard()
} else {
$InstallerArguments += "-Ticket '$Ticket'";
}
if ($null -eq $EmptyTicket) {
$InstallerArguments += "-EmptyTicket 1"
} else {
$InstallerArguments += "-EmptyTicket $EmptyTicket"
}
}
} else {
if ([string]::IsNullOrEmpty($CAFile) -And $null -eq $EmptyCA) {
if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Is your public Icinga 2 CA (ca.crt) available on a local, network or web share?' -Default 'y').result -eq 1) {
@ -385,9 +389,13 @@ function Start-IcingaAgentInstallWizard()
} else {
$InstallerArguments += "-CAFile '$CAFile'";
}
if ($null -eq $EmptyCA) {
$InstallerArguments += "-EmptyCA 1"
} else {
$InstallerArguments += "-EmptyCA $EmptyCA"
}
}
}
if ([string]::IsNullOrEmpty($ServiceUser)) {
if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to change the user the Icinga Agent service is running with (Default: "NT Authority\NetworkService")?' -Default 'n').result -eq 0) {