summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/nrpe/Manifest1
-rw-r--r--net-analyzer/nrpe/files/nrpe-3.1.0.init16
-rw-r--r--net-analyzer/nrpe/nrpe-3.1.0.ebuild64
3 files changed, 81 insertions, 0 deletions
diff --git a/net-analyzer/nrpe/Manifest b/net-analyzer/nrpe/Manifest
index 51876a8e1c1f..9dbbbda48714 100644
--- a/net-analyzer/nrpe/Manifest
+++ b/net-analyzer/nrpe/Manifest
@@ -1 +1,2 @@
DIST nrpe-2.15.tar.gz 419695 SHA256 66383b7d367de25ba031d37762d83e2b55de010c573009c6f58270b137131072 SHA512 03ce9774b5112d03235dc9da075770d89d1bcc5ffa5faf221ff7ea8ec5c92ded1e1ae9222581a87cf53736d190ac047e1acce7edc2f31f26c432d786cdef0e73 WHIRLPOOL f97ad7431138fd96588bb4e9d13404a0425bbdb8582c7c472cb20621bb77a9e9ecdeed88b9247ea20815da33c5b123368a540c5a0a058921e59367c2ce2a2b10
+DIST nrpe-3.1.0.tar.gz 501028 SHA256 22942b546f1af9b3f277daa68742b7f72a53145079adf0f086e4554e1482f24a SHA512 d67ae7cbd7f72fccc341e7da6d8774ee28da93dd14a18e6c6fbce6c9ba3fab19451ededea3cff0945ec1569026ee10f12a44bebbeac12a3b8210ed9aec4b39b8 WHIRLPOOL ecb41098e5bc87a8eaa0af8853fbe48b85a1c84a01ad5484f89aa231bb99a7604e4d67aa495651487577e3c85471bc274123809b40d791ade2c55d46d37b3e1b
diff --git a/net-analyzer/nrpe/files/nrpe-3.1.0.init b/net-analyzer/nrpe/files/nrpe-3.1.0.init
new file mode 100644
index 000000000000..acf8b549ee78
--- /dev/null
+++ b/net-analyzer/nrpe/files/nrpe-3.1.0.init
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${CFGFILE:=/etc/nagios/nrpe.cfg}
+
+extra_started_commands="reload"
+command="/usr/bin/${SVCNAME}"
+command_args="-c ${CFGFILE} --daemon"
+pidfile=/run/nrpe.pid
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --exec $command --pidfile $pidfile --signal HUP
+ eend $?
+}
diff --git a/net-analyzer/nrpe/nrpe-3.1.0.ebuild b/net-analyzer/nrpe/nrpe-3.1.0.ebuild
new file mode 100644
index 000000000000..e6ed550c91c3
--- /dev/null
+++ b/net-analyzer/nrpe/nrpe-3.1.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit systemd user
+
+DESCRIPTION="Nagios Remote Plugin Executor"
+HOMEPAGE="https://github.com/NagiosEnterprises/nrpe"
+SRC_URI="${HOMEPAGE}/releases/download/release-${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="selinux ssl"
+
+DEPEND="sys-apps/tcp-wrappers
+ ssl? ( dev-libs/openssl:0 )"
+RDEPEND="${DEPEND}
+ || ( net-analyzer/nagios-plugins net-analyzer/monitoring-plugins )
+ selinux? ( sec-policy/selinux-nagios )"
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_configure() {
+ econf \
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --with-nrpe-user=nagios \
+ --with-nrpe-group=nagios \
+ --with-piddir=/run \
+ $(use_enable ssl)
+}
+
+src_compile() {
+ emake all
+}
+
+src_install() {
+ default
+
+ dodoc Changelog SECURITY.md
+ insinto /etc/nagios
+ newins sample-config/nrpe.cfg nrpe.cfg
+ fowners root:nagios /etc/nagios/nrpe.cfg
+ fperms 0640 /etc/nagios/nrpe.cfg
+
+ newinitd "${FILESDIR}/nrpe-${PV}.init" nrpe
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/xinetd.d/
+ newins "${FILESDIR}/nrpe.xinetd.2" nrpe
+
+ rm "${D}/usr/bin/nrpe-uninstall" || die 'failed to remove uninstall tool'
+}
+
+pkg_postinst(){
+ elog 'Some users have reported incompatibilities between nrpe-2.x and'
+ elog 'nrpe-3.x. We recommend that you use the same major version for'
+ elog 'both your server and clients.'
+}