diff --git a/lib/core/framework/Get-IcingaFrameworkServiceBinary.psm1 b/lib/core/framework/Get-IcingaFrameworkServiceBinary.psm1 index 97c8396..071e7b7 100644 --- a/lib/core/framework/Get-IcingaFrameworkServiceBinary.psm1 +++ b/lib/core/framework/Get-IcingaFrameworkServiceBinary.psm1 @@ -31,6 +31,16 @@ function Get-IcingaFrameworkServiceBinary() Invoke-WebRequest -Uri $FrameworkServiceUrl -UseBasicParsing -OutFile $ZipArchive; + if ((Test-Path $ServiceBin)) { + Write-Host 'Icinga Service Binary already present. Skipping extrating'; + + return @{ + 'FrameworkServiceUrl' = $FrameworkServiceUrl; + 'ServiceDirectory' = $ServiceDirectory; + 'ServiceBin' = $ServiceBin; + }; + } + if ((Expand-IcingaZipArchive -Path $ZipArchive -Destination $ServiceDirectory) -eq $FALSE) { throw 'Failed to expand the downloaded ZIP archive'; }