View | Details | Raw Unified | Return to bug 73632
Collapse All | Expand All

(-)Makefile (-3 / +17 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	nrpe
8
PORTNAME=	nrpe
9
PORTVERSION=	1.9
9
PORTVERSION=	1.9
10
PORTREVISION=	0
10
PORTREVISION=	1
11
CATEGORIES=	net-mgmt
11
CATEGORIES=	net-mgmt
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=	nagios
13
MASTER_SITE_SUBDIR=	nagios
Lines 19-32 Link Here
19
19
20
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
21
USE_PERL5=	yes
21
USE_PERL5=	yes
22
USE_REINPLACE=	yes
23
USE_RC_SUBR=	yes
24
RC_SCRIPTS_SUB=	PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
22
25
23
CONFIGURE_ARGS=	--libexecdir=${PREFIX}/libexec/nagios --sysconfdir=${PREFIX}/etc \
26
CONFIGURE_ARGS=	--libexecdir=${PREFIX}/libexec/nagios --sysconfdir=${PREFIX}/etc \
24
		--sbindir=${PREFIX}/sbin --bindir=${PREFIX}/sbin
27
		--sbindir=${PREFIX}/sbin --bindir=${PREFIX}/sbin
25
28
29
post-patch:
30
	${CP} ${FILESDIR}/nrpe.sh ${WRKDIR}/nrpe.sh
31
	${REINPLACE_CMD} \
32
		-e 's,%%PREFIX%%,${PREFIX},g' \
33
		-e 's,%%RC_SUBR%%,${RC_SUBR},g' \
34
		${WRKDIR}/nrpe.sh
35
26
do-install:
36
do-install:
27
	${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe
37
	${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin/nrpe
28
	${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe ${PREFIX}/libexec/nagios/check_nrpe
38
	${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe \
39
		${PREFIX}/libexec/nagios/check_nrpe
29
	${INSTALL_DATA} ${WRKSRC}/nrpe.cfg ${PREFIX}/etc/nrpe.cfg-sample
40
	${INSTALL_DATA} ${WRKSRC}/nrpe.cfg ${PREFIX}/etc/nrpe.cfg-sample
30
	${INSTALL_SCRIPT} ${WRKSRC}/init-script.freebsd ${PREFIX}/etc/rc.d/nrpe.sh
41
	${INSTALL_SCRIPT} ${WRKDIR}/nrpe.sh ${PREFIX}/etc/rc.d/nrpe.sh
42
43
post-install:
44
	${CAT} ${PKGMESSAGE}
31
45
32
.include <bsd.port.mk>
46
.include <bsd.port.mk>
(-)pkg-message (+5 lines)
Added Link Here
1
*************************************************************************
2
Available variables you add/set to /etc/rc.conf:
3
- nrpe_enable (bool):	Set to "NO" by default
4
- nrpe_config (string):	Set to ${PREFIX}/etc/nrpe.cfg by default
5
*************************************************************************
(-)files/nrpe.sh (+27 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
#
7
# Add the following lines to /etc/rc.conf to enable apache2:
8
# nrpe_enable (bool):	Set to "NO" by default.
9
#			Set it to "YES" to enable nrpe
10
# nrpe_config (string):	Set to "/usr/local/etc/nrpe.cfg" by default.
11
#
12
13
. %%RC_SUBR%%
14
15
name="nrpe"
16
rcvar=`set_rcvar`
17
18
command="%%PREFIX%%/bin/nrpe"
19
20
[ -z "$nrpe_enable" ]	&& nrpe_enable="NO"
21
[ -z "$nrpe_config" ]	&& nrpe_config="%%PREFIX%%/etc/nrpe.cfg"
22
23
nrpe_flags="-d ${nrpe_config}"
24
25
load_rc_config $name
26
27
run_rc_command "$1"

Return to bug 73632