Fix Icinga Agent package fetching for x86 architecture

Fixes #78
This commit is contained in:
Christian Stein 2020-07-23 11:24:19 +02:00
parent f0b5dbd971
commit 1cfb15166b

View file

@ -24,7 +24,7 @@ function Get-IcingaAgentMSIPackage()
$UsePackage = $null;
foreach ($line in $Content) {
if ($line -like '*.msi*' -And $line -like "*$Architecture*") {
if ($line -like '*.msi*' -And $line -like "*$Architecture.msi") {
$MSIPackage = $line.SubString(
$line.IndexOf('Icinga2-'),
$line.IndexOf('.msi') - $line.IndexOf('Icinga2-')