mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 23:29:40 -05:00
Fixes Agent installation processing if no version is specified
This commit is contained in:
parent
2df18aadff
commit
47f721e62c
1 changed files with 5 additions and 0 deletions
|
|
@ -12,6 +12,11 @@ function Install-IcingaAgent()
|
|||
$IcingaInstaller = Get-IcingaAgentMSIPackage -Source $Source -Version $Version -SkipDownload;
|
||||
$InstallTarget = $IcingaData.RootDir;
|
||||
|
||||
if ([string]::IsNullOrEmpty($Version)) {
|
||||
Write-Host 'No Icinga Agent version specified. Skipping installation.';
|
||||
return $FALSE;
|
||||
}
|
||||
|
||||
if ($IcingaData.Installed -eq $TRUE -and $AllowUpdates -eq $FALSE) {
|
||||
Write-Host 'The Icinga Agent is already installed on this system. To perform updates or downgrades, please add the "-AllowUpdates" argument';
|
||||
return $FALSE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue