mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Fixes crash on existing service binary file
This commit is contained in:
parent
25ed359456
commit
7665a4401e
1 changed files with 10 additions and 0 deletions
|
|
@ -31,6 +31,16 @@ function Get-IcingaFrameworkServiceBinary()
|
||||||
|
|
||||||
Invoke-WebRequest -Uri $FrameworkServiceUrl -UseBasicParsing -OutFile $ZipArchive;
|
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) {
|
if ((Expand-IcingaZipArchive -Path $ZipArchive -Destination $ServiceDirectory) -eq $FALSE) {
|
||||||
throw 'Failed to expand the downloaded ZIP archive';
|
throw 'Failed to expand the downloaded ZIP archive';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue