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

(-)net-mgmt/Makefile (+1 lines)
Lines 186-191 Link Here
186
    SUBDIR += ng_ipacct
186
    SUBDIR += ng_ipacct
187
    SUBDIR += nitpicker
187
    SUBDIR += nitpicker
188
    SUBDIR += nrpe
188
    SUBDIR += nrpe
189
    SUBDIR += nrpe3
189
    SUBDIR += nrpe-ssl
190
    SUBDIR += nrpe-ssl
190
    SUBDIR += nsca
191
    SUBDIR += nsca
191
    SUBDIR += nsca-client
192
    SUBDIR += nsca-client
(-)net-mgmt/nrpe3/Makefile (+81 lines)
Line 0 Link Here
1
# Created by: Paul Dlug<paul@nerdlabs.com>
2
# $FreeBSD$
3
4
PORTNAME=	nrpe
5
DISTVERSION=	3.1.0
6
PORTREVISION?=	0
7
CATEGORIES=	net-mgmt
8
9
MAINTAINER=	zeising@FreeBSD.org
10
COMMENT?=	Nagios Remote Plugin Executor
11
12
LICENSE=	GPLv2
13
14
CONFLICTS=	nrpe-2.* nrpe-ssl-2.*
15
16
USE_GITHUB=	yes
17
GH_ACCOUNT=	NagiosEnterprises
18
#GH_PROJECT=	nrpe
19
GH_TAGNAME=	release-${DISTVERSION}
20
21
USES=		perl5
22
USE_PERL5=	build
23
USE_RC_SUBR=	nrpe3
24
GNU_CONFIGURE=	yes
25
26
OPTIONS_DEFINE=	SSL ARGS
27
OPTIONS_RADIO=	PLUGINS
28
OPTIONS_RADIO_PLUGINS=	MONPLUGINS NAGPLUGINS
29
OPTIONS_DEFAULT=ARGS NAGPLUGINS SSL
30
31
SSL_DESC=	Enable SSL support (disables plain-text server)
32
ARGS_DESC=	Enable command argument processing
33
NAGPLUGINS_DESC=Use net-mgmt/nagios-plugins
34
MONPLUGINS_DESC=Use net-mgmt/monitoring-plugins
35
36
SSL_USES=		ssl
37
SSL_CONFIGURE_ENABLE=	ssl
38
SSL_CONFIGURE_ON=	--with-ssl=${OPENSSLDIR} \
39
			--with-ssl-inc=${OPENSSLINC} \
40
			--with-ssl-lib=${OPENSSLLIB}
41
42
ARGS_CONFIGURE_ON=	--enable-command-args
43
ARGS_CONFIGURE_OFF=	--disable-command-args
44
45
MONPLUGINS_RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:net-mgmt/monitoring-plugins
46
NAGPLUGINS_RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:net-mgmt/nagios-plugins
47
48
NAGIOSUSER?=	nagios
49
NAGIOSGROUP?=	nagios
50
USERS=		${NAGIOSUSER}
51
GROUPS=		${NAGIOSGROUP}
52
53
NRPE_PIDDIR?=	/var/run/nrpe3
54
55
CONFIGURE_ARGS+=--bindir=${PREFIX}/sbin \
56
		--libexecdir=${PREFIX}/libexec/nagios \
57
		--sysconfdir=${PREFIX}/etc \
58
		--with-nrpe-user=${NAGIOSUSER} \
59
		--with-nrpe-group=${NAGIOSGROUP}
60
61
PLIST_SUB=	NAGIOSUSER=${NAGIOSUSER} \
62
		NAGIOSGROUP=${NAGIOSGROUP} \
63
		NRPE_PIDDIR=${NRPE_PIDDIR}
64
SUB_LIST+=	PIDDIR=${NRPE_PIDDIR}
65
66
SUB_FILES=	pkg-message
67
68
post-patch:
69
	@${REINPLACE_CMD} -e 's|/var/run/nrpe.pid|${NRPE_PIDDIR}/nrpe3.pid|g' \
70
		-e 's|/usr/lib/nagios/plugins/|${LOCALBASE}/libexec/nagios/|g' \
71
		-e 's|/usr/bin/sudo|${LOCALBASE}/bin/sudo|g' \
72
		${WRKSRC}/sample-config/nrpe.cfg.in
73
74
do-install:
75
	${INSTALL} -d ${STAGEDIR}${NRPE_PIDDIR}
76
	${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${STAGEDIR}${PREFIX}/sbin/nrpe3
77
	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nagios
78
	${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe ${STAGEDIR}${PREFIX}/libexec/nagios/check_nrpe3
79
	${INSTALL_DATA} ${WRKSRC}/sample-config/nrpe.cfg ${STAGEDIR}${PREFIX}/etc/nrpe.cfg.sample
80
81
.include <bsd.port.mk>
(-)net-mgmt/nrpe3/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1493375144
2
SHA256 (NagiosEnterprises-nrpe-3.1.0-release-3.1.0_GH0.tar.gz) = 494080bfb6cdb03226f94a4adf0baddb4aad8663ef7f78565c8564d04022a6a2
3
SIZE (NagiosEnterprises-nrpe-3.1.0-release-3.1.0_GH0.tar.gz) = 501068
(-)net-mgmt/nrpe3/files/nrpe3.in (+53 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# $FreeBSD$
4
#
5
# PROVIDE: nrpe2
6
# REQUIRE: LOGIN
7
# KEYWORD: shutdown
8
#
9
# Add the following lines to /etc/rc.conf to enable nrpe2:
10
# nrpe2_enable (bool):    Set to "NO" by default.
11
#                         Set it to "YES" to enable nrpe2.
12
# nrpe2_flags (str):      Not set by default.
13
# nrpe2_configfile (str): Set to "%%PREFIX%%/etc/nrpe.cfg" by default.
14
15
. /etc/rc.subr
16
17
name=nrpe2
18
rcvar=nrpe2_enable
19
20
load_rc_config "${name}"
21
22
: ${nrpe2_enable:=NO}
23
: ${nrpe2_configfile:=%%PREFIX%%/etc/nrpe.cfg}
24
25
required_files="${nrpe2_configfile}"
26
27
command="%%PREFIX%%/sbin/nrpe2"
28
command_args="-c ${nrpe2_configfile} -d"
29
extra_commands=reload
30
sig_reload=HUP
31
32
start_precmd=nrpe2_prestart
33
stop_precmd=find_pidfile
34
35
find_pidfile()
36
{
37
	[ -n "$nrpe2_pidfile" ] &&
38
	    warn "No longer necessary to set nrpe2_pidfile in rc.conf[.local]"
39
40
	if get_pidfile_from_conf pid_file ${nrpe2_configfile}; then
41
		pidfile="$_pidfile_from_conf"
42
	else
43
		pidfile='%%PIDDIR%%/nrpe2.pid'
44
	fi
45
}
46
47
nrpe2_prestart()
48
{
49
	find_pidfile
50
	install -d -o ${nrpe_user:-nagios} ${pidfile%/*}
51
}
52
53
run_rc_command "$1"
(-)net-mgmt/nrpe3/files/patch-src_check__nrpe.c (+11 lines)
Line 0 Link Here
1
--- src/check_nrpe.c.orig	2017-04-17 14:21:54 UTC
2
+++ src/check_nrpe.c
3
@@ -839,7 +839,7 @@ void setup_ssl()
4
 			exit(STATE_CRITICAL);
5
 		}
6
 
7
-#if OPENSSL_VERSION_NUMBER >= 0x10100000
8
+#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
9
 
10
 	SSL_CTX_set_max_proto_version(ctx, 0);
11
 
(-)net-mgmt/nrpe3/files/patch-src_nrpe.c (+11 lines)
Line 0 Link Here
1
--- src/nrpe.c.orig	2017-04-28 10:29:47 UTC
2
+++ src/nrpe.c
3
@@ -320,7 +320,7 @@ void init_ssl(void)
4
 		exit(STATE_CRITICAL);
5
 	}
6
 
7
-#if OPENSSL_VERSION_NUMBER >= 0x10100000
8
+#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
9
 
10
 	SSL_CTX_set_max_proto_version(ctx, 0);
11
 
(-)net-mgmt/nrpe3/files/pkg-message.in (+10 lines)
Line 0 Link Here
1
**********************************************************************
2
3
 Enable NRPE in /etc/rc.conf with the following line:
4
5
   nrpe2_enable="YES"
6
7
 A sample configuration is available in %%PREFIX%%/etc/nrpe.cfg.sample.
8
 Copy to nrpe.cfg where required and edit to suit your needs.
9
10
**********************************************************************
(-)net-mgmt/nrpe3/pkg-descr (+9 lines)
Line 0 Link Here
1
nrpe is used to execute Nagios plugins on remote hosts and report the results
2
to the main Nagios server. From the Nagios homepage:
3
4
Allows you to execute "local" plugins (like check_disk, check_procs, etc.) on
5
remote hosts. The check_nrpe plugin is called from Nagios and actually makes
6
the plugin requests to the remote host. Requires that nrpe be running on the
7
remote host (either as a standalone daemon or as a service under inetd).
8
9
WWW: http://www.nagios.org/
(-)net-mgmt/nrpe3/pkg-plist (+4 lines)
Line 0 Link Here
1
@sample etc/nrpe.cfg.sample
2
libexec/nagios/check_nrpe3
3
sbin/nrpe3
4
@dir(%%NAGIOSUSER%%,%%NAGIOSGROUP%%,755) %%NRPE_PIDDIR%%

Return to bug 218933