Permalink
Browse files

COOK-281, runit improvements

* changes from akzhan in ticket COOK-281
* longer sleep timer and some meaningful debug messages
  • Loading branch information...
1 parent 3a00796 commit 8aec731f7c4ca6b5eff3e627fd6dd5ed5909bd9d @jtimberman jtimberman committed May 3, 2010
Showing with 5 additions and 7 deletions.
  1. +4 −6 definitions/runit_service.rb
  2. +1 −1 metadata.rb
@@ -96,12 +96,15 @@
ruby_block "supervise_#{params[:name]}_sleep" do
block do
- (1..6).each {|i| sleep 1 unless ::FileTest.pipe?("#{sv_dir_name}/supervise/ok") }
+ Chef::Log.debug("Waiting until named pipe #{sv_dir_name}/supervise/ok exists.")
+ (1..8).each {|i| sleep 1 unless ::FileTest.pipe?("#{sv_dir_name}/supervise/ok") }
+ Chef::Log.debug("Named pipe #{sv_dir_name}/supervise/ok exists, continuing.")
end
not_if { FileTest.pipe?("#{sv_dir_name}/supervise/ok") }
end
service params[:name] do
+ provider Chef::Provider::Service::Init
supports :restart => true, :status => true
start_command "#{node[:runit][:sv_bin]} start #{params[:name]}"
stop_command "#{node[:runit][:sv_bin]} stop #{params[:name]}"
@@ -112,9 +115,4 @@
action :nothing
end
- #execute "#{params[:name]}-down" do
- # command "/etc/init.d/#{params[:name]} down"
- # only_if do params[:only_if] end
- #end
-
end
View
@@ -2,7 +2,7 @@
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs runit and provides runit_service definition"
-version "0.10"
+version "0.11.0"
%w{ ubuntu debian }.each do |os|
supports os

0 comments on commit 8aec731

Please sign in to comment.