From 0834ec7079aa80d9c972c97a285ff75c6100ae23 Mon Sep 17 00:00:00 2001 From: Jameson Date: Fri, 13 Jun 2014 14:29:00 -0700 Subject: [PATCH] gmetad starts automatically with package install, then can't be controlled by new init script --- recipes/gmetad.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/recipes/gmetad.rb b/recipes/gmetad.rb index 3abadd0..f951002 100644 --- a/recipes/gmetad.rb +++ b/recipes/gmetad.rb @@ -1,6 +1,14 @@ +service "gmetad" do + supports :restart => true, :start => true, :stop => true, :reload => true + action :nothing +end + case node['platform'] when "ubuntu", "debian" - package "gmetad" + package "gmetad" do + action :install + notifies :stop, "service[gmetad]", :immediately + end when "redhat", "centos", "fedora" include_recipe "ganglia::source" execute "copy gmetad init script" do @@ -97,8 +105,8 @@ variables( :gmetad_name => "gmetad" ) notifies :restart, "service[gmetad]" end + service "gmetad" do - supports :restart => true action [ :enable, :start ] end