diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2005-05-21 11:50:44 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2005-05-21 11:50:44 +0000 |
commit | ba275c5c487813dc3ba93e9247f1e2e22a29d569 (patch) | |
tree | 63e8045bf3b8284a721b177a799df63d1eaf9da6 /net-mgmt | |
parent | c14ea8f9136cdc6586623f94c04efb4a42b5178b (diff) | |
download | ports-ba275c5c487813dc3ba93e9247f1e2e22a29d569.tar.gz ports-ba275c5c487813dc3ba93e9247f1e2e22a29d569.zip |
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/nrpe/Makefile | 19 | ||||
-rw-r--r-- | net-mgmt/nrpe/files/nrpe.sh.in | 27 | ||||
-rw-r--r-- | net-mgmt/nrpe/files/pkg-message.in | 5 | ||||
-rw-r--r-- | net-mgmt/nrpe/pkg-plist | 2 |
4 files changed, 47 insertions, 6 deletions
diff --git a/net-mgmt/nrpe/Makefile b/net-mgmt/nrpe/Makefile index 8538df43176a..b11759f05c52 100644 --- a/net-mgmt/nrpe/Makefile +++ b/net-mgmt/nrpe/Makefile @@ -7,7 +7,7 @@ PORTNAME= nrpe PORTVERSION= 1.9 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= nagios @@ -19,14 +19,23 @@ RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagio GNU_CONFIGURE= yes USE_PERL5= yes +USE_REINPLACE= yes +USE_RC_SUBR= yes +SUB_FILES= nrpe.sh pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message -CONFIGURE_ARGS= --libexecdir=${PREFIX}/libexec/nagios --sysconfdir=${PREFIX}/etc \ - --sbindir=${PREFIX}/sbin --bindir=${PREFIX}/sbin +CONFIGURE_ARGS= \ + --libexecdir=${PREFIX}/libexec/nagios --sysconfdir=${PREFIX}/etc \ + --sbindir=${PREFIX}/sbin --bindir=${PREFIX}/sbin do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe - ${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe ${PREFIX}/libexec/nagios/check_nrpe + ${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe \ + ${PREFIX}/libexec/nagios/check_nrpe ${INSTALL_DATA} ${WRKSRC}/nrpe.cfg ${PREFIX}/etc/nrpe.cfg-sample - ${INSTALL_SCRIPT} ${WRKSRC}/init-script.freebsd ${PREFIX}/etc/rc.d/nrpe.sh + ${INSTALL_SCRIPT} ${WRKDIR}/nrpe.sh ${PREFIX}/etc/rc.d + +post-install: + ${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/net-mgmt/nrpe/files/nrpe.sh.in b/net-mgmt/nrpe/files/nrpe.sh.in new file mode 100644 index 000000000000..4cf845b560fc --- /dev/null +++ b/net-mgmt/nrpe/files/nrpe.sh.in @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# +# Add the following lines to /etc/rc.conf to enable apache2: +# nrpe_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable nrpe +# nrpe_config (string): Set to "/usr/local/etc/nrpe.cfg" by default. +# + +. %%RC_SUBR%% + +name="nrpe" +rcvar=`set_rcvar` + +command="%%PREFIX%%/bin/nrpe" + +[ -z "$nrpe_enable" ] && nrpe_enable="NO" +[ -z "$nrpe_config" ] && nrpe_config="%%PREFIX%%/etc/nrpe.cfg" + +nrpe_flags="-d ${nrpe_config}" + +load_rc_config $name + +run_rc_command "$1" diff --git a/net-mgmt/nrpe/files/pkg-message.in b/net-mgmt/nrpe/files/pkg-message.in new file mode 100644 index 000000000000..b9fec1fc5d5b --- /dev/null +++ b/net-mgmt/nrpe/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/nrpe/pkg-plist b/net-mgmt/nrpe/pkg-plist index fb4d15e163fc..5dedbaed2f4c 100644 --- a/net-mgmt/nrpe/pkg-plist +++ b/net-mgmt/nrpe/pkg-plist @@ -1,4 +1,4 @@ sbin/nrpe etc/nrpe.cfg-sample -etc/rc.d/nrpe.sh libexec/nagios/check_nrpe +etc/rc.d/nrpe.sh |