summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/nagios-plugins-flameeyes')
-rw-r--r--net-analyzer/nagios-plugins-flameeyes/metadata.xml19
-rw-r--r--net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild50
2 files changed, 69 insertions, 0 deletions
diff --git a/net-analyzer/nagios-plugins-flameeyes/metadata.xml b/net-analyzer/nagios-plugins-flameeyes/metadata.xml
new file mode 100644
index 000000000000..6baa383f5130
--- /dev/null
+++ b/net-analyzer/nagios-plugins-flameeyes/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sysadmin</herd>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="smart">
+ Install <pkg>sys-apps/smartmontools</pkg> required for
+ S.M.A.R.T. disk monitoring. Disabling the flag removes the
+ plugin file. This plugin also requires the sudo flag to be
+ enable.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">Flameeyes/nagios-plugins-flameeyes</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild b/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild
new file mode 100644
index 000000000000..ed36b23f811a
--- /dev/null
+++ b/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit git-2 multilib
+
+EGIT_REPO_URI="https://github.com/Flameeyes/${PN}.git"
+SRC_URI=""
+KEYWORDS=""
+
+DESCRIPTION="Flameeyes's custom Nagios/Icinga plugins"
+HOMEPAGE="https://github.com/Flameeyes/nagios-plugins-flameeyes"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="smart samba"
+
+RDEPEND="
+ dev-perl/Nagios-Plugin
+ sys-apps/portage
+ dev-perl/Time-Duration
+ dev-perl/TimeDate
+ smart? (
+ sys-apps/smartmontools
+ app-admin/sudo
+ )
+ samba? ( dev-perl/Filesys-SmbClient )"
+DEPEND=""
+
+src_compile() {
+ cat - > "${T}"/50${PN} <<EOF
+Cmnd_Alias NAGIOS_PLUGINS_FLAMEEYES_CMDS = /usr/sbin/smartctl
+User_Alias NAGIOS_PLUGINS_FLAMEEYES_USERS = nagios, icinga
+
+NAGIOS_PLUGINS_FLAMEEYES_USERS ALL=(root) NOPASSWD: NAGIOS_PLUGINS_FLAMEEYES_CMDS
+EOF
+}
+
+src_install() {
+ insinto /etc/sudoers.d
+ doins "${T}"/50${PN}
+
+ dodir /usr/$(get_libdir)/nagios/plugins/flameeyes
+ cp -Rp $(find . -type d -mindepth 1 -maxdepth 1 -not -name .git) \
+ "${D}/usr/$(get_libdir)/nagios/plugins/flameeyes" || die
+
+ dodoc README.md
+}