Skip to content

Commit a51c303

Browse files
authoredAug 10, 2021
[windows] Try to start NPM only when network_enabled is true (#803)
On Windows, set sysprobe_enabled to true only when node['datadog']['system_probe']['network_enabled'] is true, to prevent operations on the system-probe service when it is not installed.
1 parent 39ad158 commit a51c303

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎recipes/system-probe.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
is_windows = platform_family?('windows')
2121

2222
# Set the correct agent startup action
23-
sysprobe_enabled = node['datadog']['system_probe']['enabled'] || node['datadog']['system_probe']['network_enabled']
23+
sysprobe_enabled = if is_windows
24+
node['datadog']['system_probe']['network_enabled']
25+
else
26+
node['datadog']['system_probe']['enabled'] || node['datadog']['system_probe']['network_enabled']
27+
end
2428
sysprobe_agent_start = sysprobe_enabled ? :start : :stop
2529

2630
#

0 commit comments

Comments
 (0)
Please sign in to comment.