Skip to content

feat: add windows installer flag to install from zip #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ param (
[Parameter()]
[String]$version,
[Parameter()]
[String]$zip_dir,
[Parameter()]
[String]$observe_collection_endpoint,
[Parameter()]
[String]$observe_token
Expand All @@ -25,7 +27,13 @@ New-Item -ItemType Directory -Force -Path $observeagent_install_dir\config
New-Item -ItemType Directory -Force -Path $observeagent_install_dir\connections
New-Item -ItemType Directory -Force -Path $program_data_filestorage

Invoke-WebRequest -Uri $installer_url -OutFile $local_installer
if ($PSBoundParameters.ContainsKey('zip_dir')){
Write-Output "Installing from provided zip file: $zip_dir..."
$local_installer=$zip_dir
} else {
Write-Output "Downloading observe-agent from $installer_url..."
Invoke-WebRequest -Uri $installer_url -OutFile $local_installer
}

# Stop the observe agent if its running so that we can copy the new .exe
if((Get-Service ObserveAgent -ErrorAction SilentlyContinue)){
Expand Down
Loading