Skip to content

Commit

Permalink
[FIX] Prevent Monit template failures on non-standard Monit books
Browse files Browse the repository at this point in the history
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 a774cb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion recipes/nginx.rb
Expand Up @@ -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'
Expand Down

0 comments on commit a774cb3

Please sign in to comment.