2012-01-24 21:26:49 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Nrpe < Formula
|
|
|
|
homepage 'http://www.nagios.org/'
|
2013-06-20 23:08:35 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.14/nrpe-2.14.tar.gz'
|
2013-01-03 16:24:02 +00:00
|
|
|
sha1 'e5c827c250d2b836f850c99e17c744f9c626472b'
|
2012-01-24 21:26:49 +00:00
|
|
|
|
|
|
|
depends_on 'nagios-plugins'
|
|
|
|
|
|
|
|
def install
|
|
|
|
user = `id -un`.chomp
|
|
|
|
group = `id -gn`.chomp
|
|
|
|
|
|
|
|
inreplace 'sample-config/nrpe.cfg.in', '/var/run/nrpe.pid', var+'run/nrpe.pid'
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
2012-05-10 10:50:53 +00:00
|
|
|
"--libexecdir=#{sbin}",
|
2012-01-24 21:26:49 +00:00
|
|
|
"--with-nrpe-user=#{user}",
|
|
|
|
"--with-nrpe-group=#{group}",
|
|
|
|
"--with-nagios-user=#{user}",
|
|
|
|
"--with-nagios-group=#{group}",
|
|
|
|
"--enable-ssl",
|
|
|
|
"--enable-command-args"
|
|
|
|
system "make all"
|
|
|
|
system "make install"
|
|
|
|
system "make install-daemon-config"
|
|
|
|
(var+'run').mkpath
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
<<-EOS.undent
|
2012-05-10 10:50:53 +00:00
|
|
|
The nagios plugin check_nrpe has been installed in:
|
|
|
|
#{HOMEBREW_PREFIX}/sbin
|
2012-01-24 21:26:49 +00:00
|
|
|
|
|
|
|
You can start the daemon with
|
|
|
|
#{bin}/nrpe -c #{etc}/nrpe.cfg -d
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|