Skip to content

Commit

Permalink
Merge pull request #285 from xmik/master
Browse files Browse the repository at this point in the history
fixes #284, runit finish script to stop a container
  • Loading branch information
bflad committed Apr 14, 2015
2 parents bc586a6 + 2ffcc3e commit 8ab9473
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion providers/container.rb
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

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

0 comments on commit 8ab9473

Please sign in to comment.