Permalink
Browse files

[FIX] Prevent Monit tenmplate 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...
karmi committed Apr 30, 2013
1 parent a3fc3d7 commit 981e5a253415efe99492e42d54b0c101602ebf8a
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 981e5a2

Please sign in to comment.