summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2017-09-28 21:13:03 -0400
committerMichael Orlitzky <mjo@gentoo.org>2017-09-29 07:54:26 -0400
commita4af659e27fc6fa5569cc1d1f5aae396b6d2782e (patch)
tree8a70a113cea5c9ba12c796eac74064d8ae512ea6 /net-analyzer/nrpe/nrpe-3.2.1.ebuild
parentsys-cluster/kube-proxy: Version bump to 1.8.0 (diff)
downloadgentoo-a4af659e27fc6fa5569cc1d1f5aae396b6d2782e.tar.gz
gentoo-a4af659e27fc6fa5569cc1d1f5aae396b6d2782e.tar.bz2
gentoo-a4af659e27fc6fa5569cc1d1f5aae396b6d2782e.zip
net-analyzer/nrpe: new version 3.2.1.
Package-Manager: Portage-2.3.8, Repoman-2.3.1
Diffstat (limited to 'net-analyzer/nrpe/nrpe-3.2.1.ebuild')
-rw-r--r--net-analyzer/nrpe/nrpe-3.2.1.ebuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/net-analyzer/nrpe/nrpe-3.2.1.ebuild b/net-analyzer/nrpe/nrpe-3.2.1.ebuild
new file mode 100644
index 000000000000..fabe5f984cae
--- /dev/null
+++ b/net-analyzer/nrpe/nrpe-3.2.1.ebuild
@@ -0,0 +1,74 @@
+# 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/${P}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="command-args 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 command-args) \
+ $(use_enable ssl)
+}
+
+src_compile() {
+ emake all
+}
+
+src_install() {
+ default
+
+ dodoc CHANGELOG.md 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 "startup/openrc-init" nrpe
+ newconfd "startup/openrc-conf" nrpe
+ systemd_newunit "startup/default-service" "${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.'
+
+ if use command-args ; then
+ ewarn ''
+ ewarn 'You have enabled command-args for NRPE. That lets clients'
+ ewarn 'supply arguments to the commands that are run, and IS A'
+ ewarn 'SECURITY RISK!'
+ ewarn''
+ fi
+}