Skip to content

Commit 9b67657

Browse files
author
Chloe Hutchinson
committed
Configure win service exit to restart with delay
1 parent a89a3f5 commit 9b67657

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packer/windows/conf/bin/bk-install-elastic-stack.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ nssm set buildkite-agent AppStderr C:\buildkite-agent\buildkite-agent.log
168168
If ($lastexitcode -ne 0) { Exit $lastexitcode }
169169
nssm set buildkite-agent AppEnvironmentExtra :HOME=C:\buildkite-agent
170170
If ($lastexitcode -ne 0) { Exit $lastexitcode }
171-
nssm set buildkite-agent AppExit Default Exit
171+
nssm set buildkite-agent AppExit Default Restart
172+
If ($lastexitcode -ne 0) { Exit $lastexitcode }
173+
nssm set buildkite-agent AppRestartDelay 5000
172174
If ($lastexitcode -ne 0) { Exit $lastexitcode }
173175
nssm set buildkite-agent AppEvents Exit/Post "powershell C:\buildkite-agent\bin\terminate-instance.ps1"
174176
If ($lastexitcode -ne 0) { Exit $lastexitcode }

0 commit comments

Comments
 (0)