From d30a18346ffc5b0e4999b2b02b89b1eb0dcd554b Mon Sep 17 00:00:00 2001 From: Alexander Plate Date: Tue, 23 Jun 2020 12:37:20 +0200 Subject: [PATCH] Update Start-IcingaAgentInstallWizard.psm1 --- .../icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 index 503161a..3a14d26 100644 --- a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 +++ b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 @@ -10,6 +10,7 @@ function Start-IcingaAgentInstallWizard() $AddGlobalTemplates = $null, [string]$PackageSource, [string]$AgentVersion, + [string]$InstallDir, $AllowVersionChanges, $UpdateAgent = $null, $AddFirewallRule = $null, @@ -79,6 +80,9 @@ function Start-IcingaAgentInstallWizard() $Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'AgentVersion' -Value $AgentVersion -InstallerArguments $InstallerArguments; $AgentVersion = $Result.Value; $InstallerArguments = $Result.Args; + $Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'InstallDir' -Value $InstallDir -InstallerArguments $InstallerArguments; + $InstallDir = $Result.Value; + $InstallerArguments = $Result.Args; $Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'CAPort' -Value $CAPort -InstallerArguments $InstallerArguments; $CAPort = $Result.Value; $InstallerArguments = $Result.Args; @@ -534,7 +538,7 @@ function Start-IcingaAgentInstallWizard() } if ($RunInstaller) { - if ((Install-IcingaAgent -Version $AgentVersion -Source $PackageSource -AllowUpdates $AllowVersionChanges) -Or $Reconfigure) { + if ((Install-IcingaAgent -Version $AgentVersion -Source $PackageSource -AllowUpdates $AllowVersionChanges -InstallDir $InstallDir) -Or $Reconfigure) { Reset-IcingaAgentConfigFile; Move-IcingaAgentDefaultConfig; Set-IcingaAgentNodeName -Hostname $Hostname;