mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes execution order during Agent installation
This commit is contained in:
parent
c4585f3b61
commit
7b8f74cd4f
1 changed files with 5 additions and 5 deletions
|
|
@ -7,11 +7,6 @@ function Install-IcingaAgent()
|
||||||
[bool]$AllowUpdates = $FALSE
|
[bool]$AllowUpdates = $FALSE
|
||||||
);
|
);
|
||||||
|
|
||||||
$IcingaData = Get-IcingaAgentInstallation;
|
|
||||||
$InstalledVersion = Get-IcingaAgentVersion;
|
|
||||||
$IcingaInstaller = Get-IcingaAgentMSIPackage -Source $Source -Version $Version -SkipDownload;
|
|
||||||
$InstallTarget = $IcingaData.RootDir;
|
|
||||||
|
|
||||||
if ([string]::IsNullOrEmpty($Version)) {
|
if ([string]::IsNullOrEmpty($Version)) {
|
||||||
Write-Host 'No Icinga Agent version specified. Skipping installation.';
|
Write-Host 'No Icinga Agent version specified. Skipping installation.';
|
||||||
return $FALSE;
|
return $FALSE;
|
||||||
|
|
@ -22,6 +17,11 @@ function Install-IcingaAgent()
|
||||||
return $FALSE;
|
return $FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$IcingaData = Get-IcingaAgentInstallation;
|
||||||
|
$InstalledVersion = Get-IcingaAgentVersion;
|
||||||
|
$IcingaInstaller = Get-IcingaAgentMSIPackage -Source $Source -Version $Version -SkipDownload;
|
||||||
|
$InstallTarget = $IcingaData.RootDir;
|
||||||
|
|
||||||
if ($Version -eq 'snapshot') {
|
if ($Version -eq 'snapshot') {
|
||||||
if ($IcingaData.InstallDate -ge $IcingaInstaller.LastUpdate -And [string]::IsNullOrEmpty($InstalledVersion.Snapshot) -eq $FALSE) {
|
if ($IcingaData.InstallDate -ge $IcingaInstaller.LastUpdate -And [string]::IsNullOrEmpty($InstalledVersion.Snapshot) -eq $FALSE) {
|
||||||
Write-Host 'There is no new snapshot package available which requires to be installed.'
|
Write-Host 'There is no new snapshot package available which requires to be installed.'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue