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

Remote service administration #381

Closed
lasandell opened this issue Mar 29, 2014 · 1 comment
Closed

Remote service administration #381

lasandell opened this issue Mar 29, 2014 · 1 comment

Comments

@lasandell
Copy link
Member

The ServiceControllerHelpers module contains functions for administering Windows services, such as startService, stopService, etc. Currently, these functions can only control local services. It would be nice from a deployment standpoint to be able to control remote services as well.

Fortunately, the ServiceController class that the the module uses has the capability to control remote services - you just need to specify a host name. So adding this functionality would be trivial.

However, before I submit a pull request, I want to get people's opinion on what the optimal API would look like. Should I duplicate all the existing functions, calling them startRemoteService, stopRemoteService, etc., to avoid breaking existing scripts, or should I add a host argument to the existing functions?

One way that we could avoid duplication and still preserve compatibility is to allow the host to be specified as part of the name argument itself. So for example, to control a local service you would pass SomeService, whereas to control a remote service you would pass SomeMachine\SomeService. This seems like a nice compromise, although it depends on a non-standard way of specifying services on remote hosts. As far as I know there is no standard syntax for this.

@forki
Copy link
Member

forki commented Mar 30, 2014

I think startRemoteService is a good idea and makes it super clear what it does

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

No branches or pull requests

2 participants