Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
if nagios.cfg doesn't exist, look for icinga.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
kargig committed Oct 11, 2015
1 parent aa229b7 commit 4e9c3d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/check_check
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def main(args)
progname = File.basename($0)
settings = Settings.new
settings.nagios_cfg = "/etc/nagios3/nagios.cfg" # debian/ubuntu default
# if nagios.cfg doesn't exist, look for icinga.cfg
if !File.exist?(settings.nagios_cfg)
settings.nagios_cfg = "/etc/icinga/icinga.cfg" # debian/ubuntu default
end

opts = OptionParser.new do |opts|
opts.banner = "Usage: #{progname} [options]"
Expand Down

0 comments on commit 4e9c3d7

Please sign in to comment.