Skip to content

Commit

Permalink
Fix service restart on Windows (#681)
Browse files Browse the repository at this point in the history
Fix restart when dependent services are running
by setting a custom restart command.
  • Loading branch information
albertvaka authored Jan 11, 2021
1 parent 21cbd69 commit 7e0506f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
service { $datadog_agent::params::service_name:
ensure => $service_ensure,
enable => $service_enable,
restart => ['powershell', '-Command', 'Restart-Service -Force DatadogAgent'], # Force restarts dependent services
require => Package[$datadog_agent::params::package_name]
}
} else {
Expand Down

0 comments on commit 7e0506f

Please sign in to comment.