-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use PowerShell to set the new beats service to delayed start #8720
Conversation
Use PowerShell to execute sc config, so we can set the service to delayed start.
|
||
# Attempt to set the service to delayed start using sc config. | ||
Try { | ||
$svcDelayed='config "{0}" start=delayed-auto' -f '{{.BeatName}}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it work you directly put {{.Beatname}}
instead of using "{0}"
? Something like:
Start-Process -FilePath sc.exe -ArgumentList "config","{{.BeatName}}","start=delayed-auto"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll update the PR with that
Use PowerShell to execute sc config, so we can set the service to delayed start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script LGTM. Can you please add an entry to the CHANGELOG.asciidoc in the "Added" section under "affecting all beats".
Entry to the "Added" section under "affecting all beats".
Entry added to CHANGELOG.asciidoc |
Entry to the "Added" section under "affecting all beats".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks
Use PowerShell to execute sc config, so we can set the service to delayed start.
For issue: #8711