Merge pull request #73 from n35k3nd1r/master

Update Start-IcingaAgentInstallWizard.psm1
This commit is contained in:
Lord Hepipud 2020-06-25 11:34:30 +02:00 committed by GitHub
commit bc18053856
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,7 @@ function Start-IcingaAgentInstallWizard()
$AddGlobalTemplates = $null, $AddGlobalTemplates = $null,
[string]$PackageSource, [string]$PackageSource,
[string]$AgentVersion, [string]$AgentVersion,
[string]$InstallDir,
$AllowVersionChanges, $AllowVersionChanges,
$UpdateAgent = $null, $UpdateAgent = $null,
$AddFirewallRule = $null, $AddFirewallRule = $null,
@ -79,6 +80,9 @@ function Start-IcingaAgentInstallWizard()
$Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'AgentVersion' -Value $AgentVersion -InstallerArguments $InstallerArguments; $Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'AgentVersion' -Value $AgentVersion -InstallerArguments $InstallerArguments;
$AgentVersion = $Result.Value; $AgentVersion = $Result.Value;
$InstallerArguments = $Result.Args; $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; $Result = Set-IcingaWizardArgument -DirectorArgs $DirectorArgs -WizardArg 'CAPort' -Value $CAPort -InstallerArguments $InstallerArguments;
$CAPort = $Result.Value; $CAPort = $Result.Value;
$InstallerArguments = $Result.Args; $InstallerArguments = $Result.Args;
@ -540,7 +544,7 @@ function Start-IcingaAgentInstallWizard()
} }
if ($RunInstaller) { 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; Reset-IcingaAgentConfigFile;
Move-IcingaAgentDefaultConfig; Move-IcingaAgentDefaultConfig;
Set-IcingaAgentNodeName -Hostname $Hostname; Set-IcingaAgentNodeName -Hostname $Hostname;