aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2006-12-25 14:32:45 +0000
committerRong-En Fan <rafan@FreeBSD.org>2006-12-25 14:32:45 +0000
commiteea0eeac2ef300917262bb71936d61f203924d8a (patch)
treeb58d359e2afc0533487eef17eca92bc336d98d47 /net-mgmt
parent827415d361299e946535cd234abdfabd4ae5ca37 (diff)
downloadports-eea0eeac2ef300917262bb71936d61f203924d8a.tar.gz
ports-eea0eeac2ef300917262bb71936d61f203924d8a.zip
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/nrpe2/Makefile14
-rw-r--r--net-mgmt/nrpe2/distinfo6
-rw-r--r--net-mgmt/nrpe2/files/pkg-message.in5
-rw-r--r--net-mgmt/nrpe2/pkg-deinstall19
4 files changed, 39 insertions, 5 deletions
diff --git a/net-mgmt/nrpe2/Makefile b/net-mgmt/nrpe2/Makefile
index f8e486c28363..95bab83a19fd 100644
--- a/net-mgmt/nrpe2/Makefile
+++ b/net-mgmt/nrpe2/Makefile
@@ -6,13 +6,13 @@
#
PORTNAME= nrpe2
-PORTVERSION= 2.5.1
+PORTVERSION= 2.6
CATEGORIES= net-mgmt
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= nagios
DISTNAME= nrpe-${PORTVERSION}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= dan@langille.org
COMMENT= Nagios Remote Plugin Executor
RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
@@ -21,6 +21,7 @@ GNU_CONFIGURE= yes
USE_PERL5_BUILD= yes
USE_RC_SUBR= nrpe2.sh
+SUB_FILES= pkg-message
PLIST_FILES= sbin/nrpe2 etc/nrpe.cfg-sample libexec/nagios/check_nrpe2
@@ -47,6 +48,9 @@ post-build:
@${REINPLACE_CMD} -e 's|nrpe.pid|nrpe2.pid|g' \
${WRKSRC}/sample-config/nrpe.cfg
+pre-install:
+ PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe2
${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe \
@@ -54,4 +58,10 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/sample-config/nrpe.cfg \
${PREFIX}/etc/nrpe.cfg-sample
+post-install:
+ ${CAT} ${PKGMESSAGE}
+
+post-deinstall:
+ PKG_PREFIX=${PREFIX} ${SH} ${PKGDEINSTALL} ${PKGNAME} DEINSTALL
+
.include <bsd.port.post.mk>
diff --git a/net-mgmt/nrpe2/distinfo b/net-mgmt/nrpe2/distinfo
index b0d154023cb4..581becbf3a07 100644
--- a/net-mgmt/nrpe2/distinfo
+++ b/net-mgmt/nrpe2/distinfo
@@ -1,3 +1,3 @@
-MD5 (nrpe-2.5.1.tar.gz) = e083553deaf47a79fd23906d823afc59
-SHA256 (nrpe-2.5.1.tar.gz) = a23a0a37d81900d03884898bd0ae9b9da95348cc4a08695a4c229337c83fbe5e
-SIZE (nrpe-2.5.1.tar.gz) = 100382
+MD5 (nrpe-2.6.tar.gz) = 5df3fae4682fa6b8b393568fd9f3c88d
+SHA256 (nrpe-2.6.tar.gz) = 7bded6c501434f4d42b73e309c7be298359988ff72b593ed7d35a5aca47ad637
+SIZE (nrpe-2.6.tar.gz) = 101714
diff --git a/net-mgmt/nrpe2/files/pkg-message.in b/net-mgmt/nrpe2/files/pkg-message.in
new file mode 100644
index 000000000000..b9fec1fc5d5b
--- /dev/null
+++ b/net-mgmt/nrpe2/files/pkg-message.in
@@ -0,0 +1,5 @@
+*************************************************************************
+Available variables you add/set to /etc/rc.conf:
+- nrpe_enable (bool): Set to "NO" by default
+- nrpe_config (string): Set to %%PREFIX%%/etc/nrpe.cfg by default
+*************************************************************************
diff --git a/net-mgmt/nrpe2/pkg-deinstall b/net-mgmt/nrpe2/pkg-deinstall
new file mode 100644
index 000000000000..6be8827ebc4e
--- /dev/null
+++ b/net-mgmt/nrpe2/pkg-deinstall
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/usr/sbin
+TMPFILE=/tmp/services-$RANDOM-$$
+
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+case "$2" in
+"DEINSTALL")
+ # Note how to delete UID/GID
+ USER=nagios
+ GROUP=nagios
+ if pw usershow "${USER}" 2>/dev/null 1>&2; then
+ echo "To delete nagios user permanently, use 'pw userdel ${USER}'"
+ echo "To delete nagios group permanently, use 'pw groupdel ${GROUP}'"
+ fi
+ ;;
+esac