-
Notifications
You must be signed in to change notification settings - Fork 103
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
set RecoveryActionsOnNonCrashFailures flag in svc_config_windows #1670
Conversation
cmd/launcher/svc_config_windows.go
Outdated
|
||
defer sman.Disconnect() | ||
|
||
launcherService, err := sman.OpenService(`LauncherKolideK2Svc`) |
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.
Maybe make this a const around where launcherServiceRegistryKeyName
lives?
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.
oh yep! will do
) | ||
|
||
const ( | ||
launcherServiceName = `LauncherKolideK2Svc` |
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.
Hrm. This is fine for now, but this is an interesting thread....
The ServiceName is tied to the identifier the package was built with. I don't recall if we have it available anywhere at runtime. If we did, using that makes more sense.
If we don't, we should consider a longer arc of making something more human friendly, and where we store manage it. (Constant in agent
?) But that's all kinda future handwaving
@@ -25,7 +28,7 @@ const ( | |||
notFoundInRegistryError = "The system cannot find the file specified." | |||
) | |||
|
|||
func checkServiceConfiguration(logger log.Logger, opts *launcher.Options) { | |||
func checkServiceConfiguration(logger *slog.Logger, opts *launcher.Options) { |
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.
Slight preference to calling slog.Logger slogger
, but 🤷
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.
👍 I will update this in the second set of changes!
This makes a few updates to our windows service config at runtime:
SERVICE_FAILURE_ACTIONS_FLAG
to true