aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorBjörn Albers2012-01-24 22:26:49 +0100
committerAdam Vandenberg2012-02-26 16:39:42 -0800
commit28f7e01875b3d56b1c4ac720f7e4f9add77e7d31 (patch)
treeb233a76497c59ecc688ae303e535a25c2746895e /Library/Formula
parentadbee7b892ab5a86c139b00c2a054f11bd76a87b (diff)
downloadhomebrew-28f7e01875b3d56b1c4ac720f7e4f9add77e7d31.tar.bz2
NRPE 2.13
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/nrpe.rb43
1 files changed, 43 insertions, 0 deletions
diff --git a/Library/Formula/nrpe.rb b/Library/Formula/nrpe.rb
new file mode 100644
index 000000000..864d5e051
--- /dev/null
+++ b/Library/Formula/nrpe.rb
@@ -0,0 +1,43 @@
+require 'formula'
+
+class Nrpe < Formula
+ homepage 'http://www.nagios.org/'
+ url 'http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.13/nrpe-2.13.tar.gz'
+ md5 'e5176d9b258123ce9cf5872e33a77c1a'
+
+ depends_on 'nagios-plugins'
+
+ def plugins; HOMEBREW_PREFIX+'sbin/nagios-plugins'; end
+
+ def install
+ user = `id -un`.chomp
+ group = `id -gn`.chomp
+
+ inreplace 'configure', 'libssl.so', 'libssl.dylib'
+ inreplace 'sample-config/nrpe.cfg.in', '/var/run/nrpe.pid', var+'run/nrpe.pid'
+ system "./configure", "--disable-debug",
+ "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--libexecdir=#{plugins}",
+ "--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
+ The nagios plugin check_nrpe has been installed to:
+ #{plugins}
+
+ You can start the daemon with
+ #{bin}/nrpe -c #{etc}/nrpe.cfg -d
+ EOS
+ end
+end