github.com/crowdsecurity/crowdsec@v1.6.1/windows/Chocolatey/crowdsec/tools/chocolateyinstall.ps1 (about) 1 $ErrorActionPreference = 'Stop'; 2 $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" 3 $fileLocation = Join-Path $toolsDir 'crowdsec.msi' 4 5 $silentArgs = "/qn /norestart /l*v `"$($env:TEMP)\$($packageName).$($env:chocolateyPackageVersion).MsiInstall.log`"" 6 7 8 $pp = Get-PackageParameters 9 10 if ($pp['AgentOnly']) { 11 $silentArgs += " AGENT_ONLY=1" 12 } 13 14 15 $packageArgs = @{ 16 packageName = $env:ChocolateyPackageName 17 unzipLocation = $toolsDir 18 fileType = 'msi' 19 file64 = $fileLocation 20 softwareName = 'Crowdsec' 21 silentArgs = $silentArgs 22 validExitCodes= @(0, 3010, 1641) 23 } 24 25 Install-ChocolateyInstallPackage @packageArgs 26 27 if ($pp['AgentOnly']) { 28 Write-Host "/AgentOnly was specified. LAPI is disabled, please register your agent manually and configure the service to start on boot." 29 }