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

fixes #284, runit finish script to stop a container #285

Merged
merged 2 commits into from
Apr 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion providers/container.rb
Expand Up @@ -411,8 +411,11 @@ def service_init
if new_resource.init_type == 'runit'
runit_service service_name do
run_template_name 'docker-container'
supports :restart => true, :reload => true, :status => true
finish_script_template_name 'docker-container'
supports :restart => true, :reload => true, :status => true, :stop => true
action :nothing
finish true
restart_on_update false
end
else
service service_name do
Expand Down
4 changes: 4 additions & 0 deletions templates/default/sv-docker-container-finish.erb
@@ -0,0 +1,4 @@
#!/bin/sh

<%= Docker::Helpers.executable(node) %> stop <%= @options['service_name'] %>