summaryrefslogtreecommitdiffstats
path: root/net/nrpe
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-01-09 22:13:58 +0000
committeredwin <edwin@FreeBSD.org>2003-01-09 22:13:58 +0000
commit1732549ee0de2d7cbba6b68d5c0bc6cd4a374f4b (patch)
treeb7c76dc7135caa01ace65eabc20ecaad10ac8991 /net/nrpe
parent5a117e5b226b67dfe15d6d7779f26c472d1d9fbc (diff)
downloadFreeBSD-ports-1732549ee0de2d7cbba6b68d5c0bc6cd4a374f4b.zip
FreeBSD-ports-1732549ee0de2d7cbba6b68d5c0bc6cd4a374f4b.tar.gz
Maintainer update to version 1.7
PR: ports/46903 Submitted by: Paul Dlug <paul@nerdlabs.com>
Diffstat (limited to 'net/nrpe')
-rw-r--r--net/nrpe/Makefile7
-rw-r--r--net/nrpe/distinfo2
-rw-r--r--net/nrpe/pkg-install68
-rw-r--r--net/nrpe/pkg-plist1
4 files changed, 76 insertions, 2 deletions
diff --git a/net/nrpe/Makefile b/net/nrpe/Makefile
index 764aa79..376ce2e 100644
--- a/net/nrpe/Makefile
+++ b/net/nrpe/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= nrpe
-PORTVERSION= 1.5
+PORTVERSION= 1.7
PORTREVISION= 0
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
@@ -18,8 +18,13 @@ RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net/nagios-
GNU_CONFIGURE= yes
+pre-install:
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ ${SED} -i bak -e "s=/usr/local/bin/nrpe=${PREFIX}/sbin/nrpe=" ${WRKSRC}/init-script.freebsd
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe
${INSTALL_DATA} ${WRKSRC}/nrpe.cfg ${PREFIX}/etc/nrpe.cfg-sample
+ ${INSTALL_SCRIPT} ${WRKSRC}/init-script.freebsd ${PREFIX}/etc/rc.d/nrpe.sh
.include <bsd.port.mk>
diff --git a/net/nrpe/distinfo b/net/nrpe/distinfo
index 263e78c..36922ba 100644
--- a/net/nrpe/distinfo
+++ b/net/nrpe/distinfo
@@ -1 +1 @@
-MD5 (nrpe-1.5.tar.gz) = 6f9f696e24fe380839e01fc57e29206b
+MD5 (nrpe-1.7.tar.gz) = f9462e9446ef1928e27a612ac5f87fdb
diff --git a/net/nrpe/pkg-install b/net/nrpe/pkg-install
new file mode 100644
index 0000000..d60fb69
--- /dev/null
+++ b/net/nrpe/pkg-install
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# $FreeBSD: /tmp/pcvs/ports/net/nrpe/Attic/pkg-install,v 1.1 2003-01-09 22:13:58 edwin Exp $
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+user=nagios
+group=nagios
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if [ x"$2" = xPRE-INSTALL ]; then
+ if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+ else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+ else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw useradd ${user} -g ${group} -h - -d ${PKG_PREFIX}/var/nagios \
+ -s /nonexistent -c "Nagios pseudo-user" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+fi
diff --git a/net/nrpe/pkg-plist b/net/nrpe/pkg-plist
index 22b85e6..04a8298 100644
--- a/net/nrpe/pkg-plist
+++ b/net/nrpe/pkg-plist
@@ -1,2 +1,3 @@
sbin/nrpe
etc/nrpe.cfg-sample
+etc/rc.d/nrpe.sh
OpenPOWER on IntegriCloud