Skip to content

Commit

Permalink
service should subscribe only if the supervise pipe exists
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Dec 23, 2009
1 parent f3a89dd commit 7d73b76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions runit/definitions/runit_service.rb
Expand Up @@ -67,8 +67,10 @@

service params[:name] do
supports :restart => true, :status => true
subscribes :restart, resources(:template => "#{sv_dir_name}/run")
subscribes :restart, resources(:template => "#{sv_dir_name}/log/run")
if FileTest.pipe?("#{sv_dir_name}/supervise/ok")
subscribes :restart, resources(:template => "#{sv_dir_name}/run")
subscribes :restart, resources(:template => "#{sv_dir_name}/log/run")
end
action :nothing
end

Expand Down
2 changes: 1 addition & 1 deletion runit/metadata.rb
Expand Up @@ -2,7 +2,7 @@
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs runit and provides runit_service definition"
version "0.7"
version "0.8"

%w{ ubuntu debian }.each do |os|
supports os
Expand Down

0 comments on commit 7d73b76

Please sign in to comment.