Skip to content

Commit

Permalink
wrap Nagios self-check fix so as not to break on older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jstange committed May 15, 2015
1 parent ca78e5d commit 55ef68a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cookbooks/mu-master/recipes/update_nagios_only.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@

# Workaround for minor Nagios (cookbook?) bug. It looks for this at the wrong
# URL at the moment, so copy it where it's actually looking.
remote_file "/usr/lib/cgi-bin/statusjson.cgi" do
source "file:///usr/lib/cgi-bin/nagios/statusjson.cgi"
mode 0755
owner "root"
group "nagios"
if File.exists?("usr/lib/cgi-bin/nagios/statusjson.cgi")
remote_file "/usr/lib/cgi-bin/statusjson.cgi" do
source "file:///usr/lib/cgi-bin/nagios/statusjson.cgi"
mode 0755
owner "root"
group "nagios"
end
end

["/usr/lib/nagios", "/etc/nagios", "/etc/nagios3", "/var/log/nagios", "/var/www/html/docs"].each { |dir|
Expand Down

0 comments on commit 55ef68a

Please sign in to comment.