Skip to content
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 run as windows service #3410

Closed
wants to merge 6 commits into from
Closed

Support run as windows service #3410

wants to merge 6 commits into from

Conversation

chai2010
Copy link

  1. sc create etcd binPath= "C:\etcd\etcd.exe -data-dir=C:\etcd\etcd.service.data"
  2. net start etcd
  3. net stop etcd
  4. sc delete etcd

Notes: Add "golang.org/x/sys/windows/svc" to vendor.

1. `sc create etcd binPath= "C:\etcd\etcd.exe -data-dir=C:\etcd\etcd.service.data"`
2. `net start etcd`
3. `net stop etcd`
4. `sc delete etcd`
@xiang90
Copy link
Contributor

xiang90 commented Aug 31, 2015

@chai2010 Can you fix the issue reported by go vet? main_windows.go:143: declaration of err shadows declaration at main_windows.go:130:

@judwhite @cloudtrends Can you please take a look?

@judwhite
Copy link
Contributor

I'm very interested in this, just wanted to give a heads up my response may be delayed due to other commitments. I will try it out locally and follow up within the week.

@judwhite
Copy link
Contributor

I have some concerns with the approach taken here. I'll leave comments on this PR but it may require enough changes where a new PR might make more sense. Thanks @chai2010 for getting this started.

main_windows.go Outdated
}

func (m *etcdService) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (ssec bool, errno uint32) {
const cmdsAccepted = svc.AcceptStop | svc.AcceptShutdown | svc.AcceptPauseAndContinue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest removing svc.AcceptPauseAndContinue

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@judwhite
Copy link
Contributor

@chai2010 Are you still interested in this? If you're too busy I can see it through and find another reviewer to help us out.

@chai2010
Copy link
Author

@judwhite sorry for this delayed comments. I do some other work these days.
Thanks for your review.

@hminaya
Copy link

hminaya commented Feb 9, 2016

Any updates on this?

@judwhite
Copy link
Contributor

judwhite commented Feb 9, 2016

Sort of, I'm working with the authors of NSQ on a similar change. We're working out final details and I'd like to reference the work there once it's merged. The PR is old, but day jobs, and holidays. We're picking it back up and just spoke today about it. nsqio/nsq#676

@hminaya
Copy link

hminaya commented Feb 11, 2016

@judwhite great, thanks for the update, if there is anything I can do to help just let me know

@judwhite
Copy link
Contributor

This landed in nsqio/nsq#718

@chai2010 @xiang90 @hminaya what do you think of this approach?

@hminaya
Copy link

hminaya commented Feb 24, 2016

@judwhite sounds good to me.

@gyuho gyuho force-pushed the master branch 2 times, most recently from 44ca396 to 4301f49 Compare June 2, 2017 15:53
@gyuho
Copy link
Contributor

gyuho commented May 2, 2018

Closing due to inactivity. Please create a new one if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants