Skip to content

Instantly share code, notes, and snippets.

@tow
tow / etc_service.rb
Created September 2, 2011 18:08
chef resource for a service running in /etc/service
define :etc_service, :action => :restart do
package "daemontools" do
action :install
end
path = params[:path] ? params[:path] : ("/etc/service/" + params[:name])
log_path = params[:log_path] ? params[:log_path] : ("/var/log/multilog/" + params[:name])
if params[:action] == :delete
directory path do
action :delete
recursive :true
@tow
tow / a
Created July 22, 2008 13:00
blah blah
and rhubarb