-
Notifications
You must be signed in to change notification settings - Fork 264
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
Support registering and unregistering ncproxy as a Windows service #1046
Conversation
@anmaxvl @katiewasnothere ptal when you get a chance again. |
cmd/ncproxy/run.go
Outdated
*logDir = filepath.Dir(binLocation) | ||
} else { | ||
// If a log dir was provided, make sure it exists. | ||
if _, err := os.Stat(*logDir); os.IsNotExist(err) { |
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.
should we return errors that aren't os.IsNotExist?
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 guess we should just check err != nil as mkdirall will just return nil if the directory already exists.
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.
small comment and question, otherwise LGTM
@katiewasnothere Thanks! |
955a6ed
to
ad95e18
Compare
Borrowed heavily from the Containerd implementation: https://github.com/containerd/containerd/blob/master/cmd/containerd/command/service_windows.go Go mod vendor to bring in the x/sys/windows/svc package Signed-off-by: Daniel Canter <dcanter@microsoft.com>
Push was squashing the pr feedback commits |
Related work items: microsoft#930, microsoft#962, microsoft#1004, microsoft#1008, microsoft#1039, microsoft#1045, microsoft#1046, microsoft#1047, microsoft#1052, microsoft#1053, microsoft#1054, microsoft#1057, microsoft#1058, microsoft#1060, microsoft#1061, microsoft#1063, microsoft#1064, microsoft#1068, microsoft#1069, microsoft#1070, microsoft#1071, microsoft#1074, microsoft#1078, microsoft#1079, microsoft#1081, microsoft#1082, microsoft#1083, microsoft#1084, microsoft#1088, microsoft#1090, microsoft#1091, microsoft#1093, microsoft#1094, microsoft#1096, microsoft#1098, microsoft#1099, microsoft#1102, microsoft#1103, microsoft#1105, microsoft#1106, microsoft#1108, microsoft#1109, microsoft#1115, microsoft#1116, microsoft#1122, microsoft#1123, microsoft#1126
Borrowed heavily from the Containerd implementation:
https://github.com/containerd/containerd/blob/master/cmd/containerd/command/service_windows.go
Go mod vendor to bring in the x/sys/windows/svc package
Signed-off-by: Daniel Canter dcanter@microsoft.com