File tree Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ $temp_dir="C:\temp"
21
21
22
22
New-Item - ItemType Directory - Force - Path $temp_dir
23
23
New-Item - ItemType Directory - Force - Path $observeagent_install_dir
24
+ New-Item - ItemType Directory - Force - Path $observeagent_install_dir \config
24
25
New-Item - ItemType Directory - Force - Path $observeagent_install_dir \connections
25
26
New-Item - ItemType Directory - Force - Path $program_data_filestorage
26
27
@@ -33,6 +34,7 @@ if((Get-Service ObserveAgent -ErrorAction SilentlyContinue)){
33
34
34
35
Expand-Archive - Force - LiteralPath $local_installer - DestinationPath " $temp_dir \observe-agent_Windows_x86_64"
35
36
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
36
38
Copy-Item - Force - Path $temp_dir \observe- agent_Windows_x86_64\connections\* - Destination $observeagent_install_dir \connections - Recurse
37
39
38
40
# 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
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ sudo cp -f $tmp_dir/observe-agent $agent_binary_path
94
94
95
95
# Copy all config files to the proper dir.
96
96
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
97
98
sudo cp -fR $tmp_dir /connections $observeagent_config_dir /connections
98
99
sudo chown -R root:root $observeagent_config_dir
99
100
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ sudo chmod +rw /var/lib/observe-agent/filestorage
101
101
# Copy all files to the install dir.
102
102
sudo rm -rf $observeagent_install_dir /config $observeagent_install_dir /connections $observeagent_install_dir /observe-agent
103
103
sudo cp $tmp_dir /observe-agent $observeagent_install_dir /observe-agent
104
+ sudo cp -R $tmp_dir /config $observeagent_install_dir /config
104
105
sudo cp -R $tmp_dir /connections $observeagent_install_dir /connections
105
106
sudo chown -R root:wheel $observeagent_install_dir
106
107
You can’t perform that action at this time.
0 commit comments