Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 331685 | Differences between
and this patch

Collapse All | Expand All

(-)net-analyzer/nagios-nrpe/files/nrpe (-3 / +3 lines)
Lines 1-4 Link Here
1
#!/sbin/runscript
1
#!@GENTOO_PORTAGE_EPREFIX@/sbin/runscript
2
2
3
opts="${opts} reload"
3
opts="${opts} reload"
4
4
Lines 9-17 Link Here
9
start() {
9
start() {
10
	ebegin "Starting nrpe"
10
	ebegin "Starting nrpe"
11
	start-stop-daemon --start --quiet --name nrpe \
11
	start-stop-daemon --start --quiet --name nrpe \
12
	--startas /usr/nagios/bin/nrpe \
12
	--startas @GENTOO_PORTAGE_EPREFIX@/usr/nagios/bin/nrpe \
13
		-c nagios:nagios \
13
		-c nagios:nagios \
14
		-- -c /etc/nagios/nrpe.cfg \
14
		-- -c @GENTOO_PORTAGE_EPREFIX@/etc/nagios/nrpe.cfg \
15
		--daemon
15
		--daemon
16
	eend $? "Failed to Start nrpe"
16
	eend $? "Failed to Start nrpe"
17
}
17
}
(-)net-analyzer/nagios-nrpe/files/nrpe-nagios3 (-3 / +3 lines)
Lines 1-4 Link Here
1
#!/sbin/runscript
1
#!@GENTOO_PORTAGE_EPREFIX@/sbin/runscript
2
2
3
opts="${opts} reload"
3
opts="${opts} reload"
4
4
Lines 9-17 Link Here
9
start() {
9
start() {
10
	ebegin "Starting nrpe"
10
	ebegin "Starting nrpe"
11
	start-stop-daemon --start --quiet --name nrpe \
11
	start-stop-daemon --start --quiet --name nrpe \
12
	--startas /usr/bin/nrpe \
12
	--startas @GENTOO_PORTAGE_EPREFIX@/usr/bin/nrpe \
13
		-c nagios:nagios \
13
		-c nagios:nagios \
14
		-- -c /etc/nagios/nrpe.cfg \
14
		-- -c @GENTOO_PORTAGE_EPREFIX@/etc/nagios/nrpe.cfg \
15
		--daemon
15
		--daemon
16
	eend $? "Failed to Start nrpe"
16
	eend $? "Failed to Start nrpe"
17
}
17
}
(-)net-analyzer/nagios-nrpe/nagios-nrpe-2.12-r103.ebuild (-7 / +18 lines)
Lines 4-10 Link Here
4
4
5
EAPI=2
5
EAPI=2
6
6
7
inherit eutils toolchain-funcs
7
inherit eutils toolchain-funcs prefix autotools
8
8
9
DESCRIPTION="Nagios $PV NRPE - Nagios Remote Plugin Executor"
9
DESCRIPTION="Nagios $PV NRPE - Nagios Remote Plugin Executor"
10
HOMEPAGE="http://www.nagios.org/"
10
HOMEPAGE="http://www.nagios.org/"
Lines 26-35 Link Here
26
	enewuser nagios -1 /bin/bash /dev/null nagios
26
	enewuser nagios -1 /bin/bash /dev/null nagios
27
}
27
}
28
28
29
src_unpack() {
30
	unpack ${A}
31
32
	mkdir ${WORKDIR}/extras
33
	cp "${FILESDIR}"/nrpe-nagios3 ${WORKDIR}/extras/
34
}
35
29
src_prepare() {
36
src_prepare() {
30
	# Add support for large output,
37
	# Add support for large output,
31
	# http://opsview-blog.opsera.com/dotorg/2008/08/enhancing-nrpe.html
38
	# http://opsview-blog.opsera.com/dotorg/2008/08/enhancing-nrpe.html
32
	epatch "${FILESDIR}/multiline.patch"
39
	epatch "${FILESDIR}/multiline.patch"
40
41
	# Doesn't look for .dylib on MacOSX
42
	epatch "${FILESDIR}"/${P}-darwin-dylib.patch
43
	eautoreconf
44
	eprefixify ${WORKDIR}/extras/nrpe-nagios3
33
}
45
}
34
46
35
src_configure() {
47
src_configure() {
Lines 41-54 Link Here
41
	# Generate the dh.h header file for better security (2005 Mar 20 eldad)
53
	# Generate the dh.h header file for better security (2005 Mar 20 eldad)
42
	if useq ssl ; then
54
	if useq ssl ; then
43
		openssl dhparam -C 512 | sed -n '1,/BEGIN DH PARAMETERS/p' | grep -v "BEGIN DH PARAMETERS" > "${S}"/src/dh.h
55
		openssl dhparam -C 512 | sed -n '1,/BEGIN DH PARAMETERS/p' | grep -v "BEGIN DH PARAMETERS" > "${S}"/src/dh.h
56
		myconf="${myconf} --with-ssl=${EPREFIX}/usr"
44
	fi
57
	fi
45
58
46
	econf ${myconf} \
59
	econf ${myconf} \
47
		--host=${CHOST} \
60
		--libexecdir=${EPREFIX}/usr/$(get_libdir)/nagios/plugins \
48
		--prefix=/usr \
61
		--localstatedir=${EPREFIX}/var/nagios \
49
		--libexecdir=/usr/$(get_libdir)/nagios/plugins \
62
		--sysconfdir=${EPREFIX}/etc/nagios \
50
		--localstatedir=/var/nagios \
51
		--sysconfdir=/etc/nagios \
52
		--with-nrpe-user=nagios \
63
		--with-nrpe-user=nagios \
53
		--with-nrpe-grp=nagios || die "econf failed"
64
		--with-nrpe-grp=nagios || die "econf failed"
54
}
65
}
Lines 77-83 Link Here
77
	exeinto /usr/$(get_libdir)/nagios/plugins
88
	exeinto /usr/$(get_libdir)/nagios/plugins
78
	doexe src/check_nrpe contrib/nrpe_check_control
89
	doexe src/check_nrpe contrib/nrpe_check_control
79
90
80
	newinitd "${FILESDIR}"/nrpe-nagios3 nrpe
91
	newinitd ${WORKDIR}/extras/nrpe-nagios3 nrpe
81
92
82
	# Create pidfile in /var/run/nrpe, bug #233859
93
	# Create pidfile in /var/run/nrpe, bug #233859
83
	keepdir /var/run/nrpe
94
	keepdir /var/run/nrpe

Return to bug 331685