From 1a9f1945bd43ae50fe06ddfdcaa8f96c4037e524 Mon Sep 17 00:00:00 2001 From: Ian Delahorne Date: Wed, 11 Jul 2012 20:05:15 +0200 Subject: [PATCH] [COOK-1437] Just restart immediately, since we want this behaviour for all runs, not only the first I was too focused on the first run behaviour, and realized we want to force a restart immediately on all runs. --- recipes/server_debian.rb | 2 +- recipes/server_redhat.rb | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/recipes/server_debian.rb b/recipes/server_debian.rb index 048c2425a..82944782f 100644 --- a/recipes/server_debian.rb +++ b/recipes/server_debian.rb @@ -56,5 +56,5 @@ owner "postgres" group "postgres" mode 0600 - notifies :restart, resources(:service => "postgresql") + notifies :restart, resources(:service => "postgresql"), :immediately end diff --git a/recipes/server_redhat.rb b/recipes/server_redhat.rb index a1ed98179..f7901a048 100644 --- a/recipes/server_redhat.rb +++ b/recipes/server_redhat.rb @@ -70,7 +70,7 @@ service "postgresql" do supports :restart => true, :status => true, :reload => true - action :enable + action [:enable, :restart] end template "#{node[:postgresql][:dir]}/postgresql.conf" do @@ -78,10 +78,6 @@ owner "postgres" group "postgres" mode 0600 - notifies :restart, resources(:service => "postgresql") + notifies :restart, resources(:service => "postgresql"), :immediately end -service "postgresql" do - supports :restart => true, :status => true, :reload => true - action :start -end