diff --git a/jobs/consul_agent_windows/spec b/jobs/consul_agent_windows/spec index 9b1b14f..886ef8e 100755 --- a/jobs/consul_agent_windows/spec +++ b/jobs/consul_agent_windows/spec @@ -7,6 +7,7 @@ templates: confab.json.erb: confab.json consul_link.json.erb: consul_link.json pre-start.ps1.erb: bin/pre-start.ps1 + post-start.ps1.erb: bin/post-start.ps1 packages: - consul-windows diff --git a/jobs/consul_agent_windows/templates/post-start.ps1.erb b/jobs/consul_agent_windows/templates/post-start.ps1.erb new file mode 100644 index 0000000..f9b941d --- /dev/null +++ b/jobs/consul_agent_windows/templates/post-start.ps1.erb @@ -0,0 +1,6 @@ +$ErrorActionPreference = "Stop"; +trap { + $host.SetShouldExit(1) +} + +(Get-Process -Name consul).PriorityClass='High'