aboutsummaryrefslogtreecommitdiffstats
path: root/main/nrpe
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-01-20 13:16:40 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-01-20 13:16:40 +0000
commit8ead7a5dd2a21b3c51cab6f740c6f63c9fe31896 (patch)
treee96b54dc7e8e59fd3af32abdbe24c3bd843a7904 /main/nrpe
parent5c26937f96946360ecb19a6db1093c508e4df980 (diff)
downloadaports-8ead7a5dd2a21b3c51cab6f740c6f63c9fe31896.tar.bz2
aports-8ead7a5dd2a21b3c51cab6f740c6f63c9fe31896.tar.xz
main/nrpe: moved from testing
Diffstat (limited to 'main/nrpe')
-rw-r--r--main/nrpe/APKBUILD35
-rw-r--r--main/nrpe/nrpe.initd37
-rw-r--r--main/nrpe/nrpe.pre-install5
3 files changed, 77 insertions, 0 deletions
diff --git a/main/nrpe/APKBUILD b/main/nrpe/APKBUILD
new file mode 100644
index 0000000000..ba12953e22
--- /dev/null
+++ b/main/nrpe/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor:
+# Maintainer:
+pkgname=nrpe
+pkgver=2.12
+pkgrel=1
+pkgusers="nagios"
+pkggroups="nagios"
+pkgdesc="NRPE allows you to remotely execute Nagios plugins on other Linux/Unix machines."
+url="http://www.nagios.org/download/addons"
+license="GPL"
+depends=""
+makedepends="openssl-dev perl"
+install="nrpe.pre-install"
+subpackages=
+source="http://downloads.sourceforge.net/nagios/$pkgname-$pkgver.tar.gz
+ nrpe.initd"
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir" install install-daemon-config
+ install -Dm755 ../nrpe.initd "$pkgdir"/etc/init.d/nrpe
+}
+
+md5sums="b2d75e2962f1e3151ef58794d60c9e97 nrpe-2.12.tar.gz
+a1e3fbbfdd46437f7385742d49d5eb85 nrpe.initd"
diff --git a/main/nrpe/nrpe.initd b/main/nrpe/nrpe.initd
new file mode 100644
index 0000000000..0bff759cee
--- /dev/null
+++ b/main/nrpe/nrpe.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+daemon=/usr/bin/nrpe
+conf=/etc/nrpe.cfg
+
+depend() {
+ need net
+ after firewall
+}
+
+get_pidfile() {
+ if [ -r $conf ]; then
+ pidfile=$(awk -F= '/^pid_file/ {print $2}' $conf)
+ fi
+ pidfile=${pidfile:-/var/run/nrpe.pid}
+}
+
+start() {
+ get_pidfile
+ ebegin "Starting NRPE"
+ start-stop-daemon --start --quiet \
+ --pidfile $pidfile \
+ --exec $daemon -- ${nrpe_options:- -c $conf -d}
+ eend $?
+}
+
+stop() {
+ get_pidfile
+ ebegin "Stopping NRPE"
+ start-stop-daemon --stop --quiet \
+ --exec $daemon \
+ --pidfile $pidfile
+ eend $?
+}
+
diff --git a/main/nrpe/nrpe.pre-install b/main/nrpe/nrpe.pre-install
new file mode 100644
index 0000000000..5b7b5f68bd
--- /dev/null
+++ b/main/nrpe/nrpe.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+adduser -H -h /dev/null -s /bin/false -D nagios 2>/dev/null
+addgroup nagios 2>/dev/null
+exit 0