From 31c0b1944526d4476d41f1a6c330fb518007d69a Mon Sep 17 00:00:00 2001 From: Pal David Gergely Date: Tue, 15 Jul 2014 15:30:37 +0200 Subject: [PATCH] Changed the order of the script and the Zabbix agent config to make sure that the script is available when the Zabbix clients tries to access it when it's running. Also made the agent restart delayed, since it's not useful to restart it multiple times if it comes to that during the chef-client run. --- recipes/nginx.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/recipes/nginx.rb b/recipes/nginx.rb index c514450..2ae4070 100644 --- a/recipes/nginx.rb +++ b/recipes/nginx.rb @@ -19,17 +19,16 @@ include_recipe "zabbix-custom-checks::default" -template "#{node.zabbix.agent.include_dir}/nginx.conf" do - source "nginx/nginx.conf.erb" - mode "644" - notifies :restart, "service[zabbix_agentd]" -end - template "#{node.zabbix.external_dir}/nginx_status.sh" do source "nginx/nginx_status.sh.erb" mode "755" end +template "#{node.zabbix.agent.include_dir}/nginx.conf" do + source "nginx/nginx.conf.erb" + mode "644" + notifies :restart, "service[zabbix_agentd]", :delayed +end include_recipe "nginx"