Skip to content

Commit 9bc5d79

Browse files
fix: make install scripts backwards compatible
1 parent f3f56e7 commit 9bc5d79

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

scripts/install.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $temp_dir="C:\temp"
2121

2222
New-Item -ItemType Directory -Force -Path $temp_dir
2323
New-Item -ItemType Directory -Force -Path $observeagent_install_dir
24+
New-Item -ItemType Directory -Force -Path $observeagent_install_dir\config
2425
New-Item -ItemType Directory -Force -Path $observeagent_install_dir\connections
2526
New-Item -ItemType Directory -Force -Path $program_data_filestorage
2627

@@ -33,6 +34,7 @@ if((Get-Service ObserveAgent -ErrorAction SilentlyContinue)){
3334

3435
Expand-Archive -Force -LiteralPath $local_installer -DestinationPath "$temp_dir\observe-agent_Windows_x86_64"
3536
Copy-Item -Force -Path $temp_dir\observe-agent_Windows_x86_64\observe-agent.exe -Destination $observeagent_install_dir
37+
Copy-Item -Force -Path $temp_dir\observe-agent_Windows_x86_64\otel-collector.yaml -Destination $observeagent_install_dir\config\otel-collector.yaml
3638
Copy-Item -Force -Path $temp_dir\observe-agent_Windows_x86_64\connections\* -Destination $observeagent_install_dir\connections -Recurse
3739

3840
# If there's already an observe-agent.yaml we don't copy the template from the downloaded installation package and leave existing observe-agent.yaml alone

scripts/install_linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ sudo cp -f $tmp_dir/observe-agent $agent_binary_path
9494

9595
# Copy all config files to the proper dir.
9696
sudo rm -rf $observeagent_config_dir/otel-collector.yaml $observeagent_config_dir/connections
97+
sudo cp -f $tmp_dir/otel-collector.yaml $observeagent_config_dir/otel-collector.yaml
9798
sudo cp -fR $tmp_dir/connections $observeagent_config_dir/connections
9899
sudo chown -R root:root $observeagent_config_dir
99100

scripts/install_mac.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ sudo chmod +rw /var/lib/observe-agent/filestorage
101101
# Copy all files to the install dir.
102102
sudo rm -rf $observeagent_install_dir/config $observeagent_install_dir/connections $observeagent_install_dir/observe-agent
103103
sudo cp $tmp_dir/observe-agent $observeagent_install_dir/observe-agent
104+
sudo cp -R $tmp_dir/config $observeagent_install_dir/config
104105
sudo cp -R $tmp_dir/connections $observeagent_install_dir/connections
105106
sudo chown -R root:wheel $observeagent_install_dir
106107

0 commit comments

Comments
 (0)