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

Add stop parameter #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lsjostro
Copy link

@lsjostro lsjostro commented Dec 8, 2014

A command to execute to stop the service. A failure of this command will cause the stop to abort. Useful when killing process is not enough.

@jordansissel
Copy link
Owner

Curious, can you tell me the use case for this?

Additionally, would you mind adding tests and also support for the other platforms? Others may be able to help with this, so you aren't alone :)

@lsjostro
Copy link
Author

lsjostro commented Dec 8, 2014

No problem! One example could be to control docker containers from systemd, one don't simply kill the "docker run" process, you need to pass in "docker stop " in order to cleanly stop the process. That's what I would like to do.

Don't know about the other process-controllers.. so hopefully others can help me out here.

I'll look into getting the test-suite to run.

@jordansissel
Copy link
Owner

@lsjostro It may seem silly, but we could file a ticket with Docker to discuss SIGINT and SIGTERM terminating a 'docker run' the same way 'docker stop' would.

Regardless, I am in favor of this features anyway. A custom 'stop' procedure seems reasonable, even if not all platforms can support it (daemontools, runit, etc cannot do this)

@jordansissel
Copy link
Owner

To add support for other platforms, we could have a wrapper tool that executes the custom 'stop' functionality on INT/TERM signals. This would make it work with any platform (daemontools, etc)

@beddari
Copy link

beddari commented Dec 10, 2014

That plan for supporting other platforms is ... incredibly simple and functional. It would save me a LOT in future headaches.

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

Successfully merging this pull request may close these issues.

3 participants