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,7 +363,11 @@ function Start-IcingaAgentInstallWizard()
} else { } else {
$InstallerArguments += "-Ticket '$Ticket'"; $InstallerArguments += "-Ticket '$Ticket'";
} }
$InstallerArguments += "-EmptyTicket $EmptyTicket" if ($null -eq $EmptyTicket) {
$InstallerArguments += "-EmptyTicket 1"
} else {
$InstallerArguments += "-EmptyTicket $EmptyTicket"
}
} }
} else { } else {
if ([string]::IsNullOrEmpty($CAFile) -And $null -eq $EmptyCA) { if ([string]::IsNullOrEmpty($CAFile) -And $null -eq $EmptyCA) {
@ -385,7 +389,11 @@ function Start-IcingaAgentInstallWizard()
} else { } else {
$InstallerArguments += "-CAFile '$CAFile'"; $InstallerArguments += "-CAFile '$CAFile'";
} }
$InstallerArguments += "-EmptyCA $EmptyCA" if ($null -eq $EmptyCA) {
$InstallerArguments += "-EmptyCA 1"
} else {
$InstallerArguments += "-EmptyCA $EmptyCA"
}
} }
} }