mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes Agent installation prompt
This commit is contained in:
parent
02dbe9bb09
commit
2df18aadff
1 changed files with 10 additions and 5 deletions
|
|
@ -189,13 +189,18 @@ function Start-IcingaAgentInstallWizard()
|
|||
Write-Host ([string]::Format('Using package source "{0}" for the Icinga 2 Agent package', $PackageSource));
|
||||
$AllowVersionChanges = $TRUE;
|
||||
$InstallerArguments += '-AllowVersionChanges 1';
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrEmpty($AgentVersion)) {
|
||||
$AgentVersion = (Get-IcingaAgentInstallerAnswerInput -Prompt 'Please specify the version you wish to install ("latest", "snapshot", or a version like "2.11.0")' -Default 'v' -DefaultInput 'latest').answer;
|
||||
if ([string]::IsNullOrEmpty($AgentVersion)) {
|
||||
$AgentVersion = (Get-IcingaAgentInstallerAnswerInput -Prompt 'Please specify the version you wish to install ("latest", "snapshot", or a version like "2.11.0")' -Default 'v' -DefaultInput 'latest').answer;
|
||||
$InstallerArguments += "-AgentVersion '$AgentVersion'";
|
||||
|
||||
Write-Host ([string]::Format('Installing Icinga Version: "{0}"', $AgentVersion));
|
||||
}
|
||||
} else {
|
||||
$AllowVersionChanges = $FALSE;
|
||||
$InstallerArguments += '-AllowVersionChanges 0';
|
||||
$InstallerArguments += "-AgentVersion '$AgentVersion'";
|
||||
|
||||
Write-Host ([string]::Format('Installing Icinga Version: "{0}"', $AgentVersion));
|
||||
$AgentVersion = '';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue