Permalink
Browse files

[FIX] Prevent Monit template failures on non-standard Monit books

The https://github.com/phlipper/chef-monit cookbook does not define
the `monitrc` method, but uses the `monit_monitrc` LWRP.

See phlipper/chef-monit@2802d12
  • Loading branch information...
1 parent a3fc3d7 commit a774cb347ddcd237237a41085add77c678110f05 @karmi karmi committed Apr 30, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 recipes/nginx.rb
View
@@ -41,7 +41,7 @@
notifies :restart, 'service[nginx]', :immediately
end
-if node.recipes.include?('monit') and defined?(:monitrc)
+if node.recipes.include?('monit') and respond_to?(:monitrc)
monitrc "nginx.monitrc" do
template_cookbook 'elasticsearch'
source 'nginx.monitrc.conf.erb'

0 comments on commit a774cb3

Please sign in to comment.