mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes crash on existing service binary file
This commit is contained in:
parent
78a2cf4466
commit
621af88831
1 changed files with 10 additions and 0 deletions
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue