summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-11-23 16:39:04 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-11-23 16:39:04 +0000
commite8f0941aa2476c9656549fa57f2760c64b970b6d (patch)
tree2617db92ac75283f786229e870f876d4e4300110 /net-analyzer
parentSImplified dependencies (diff)
downloadgentoo-2-e8f0941aa2476c9656549fa57f2760c64b970b6d.tar.gz
gentoo-2-e8f0941aa2476c9656549fa57f2760c64b970b6d.tar.bz2
gentoo-2-e8f0941aa2476c9656549fa57f2760c64b970b6d.zip
Initial import of a live ebuild for my own set of nagios plugins. This makes it much easier to deal with their dependencies, and two out of three at the time of adding are Gentoo-specific. An actual release will follow when I'll be done writing a few more.
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/nagios-plugins-flameeyes/ChangeLog12
-rw-r--r--net-analyzer/nagios-plugins-flameeyes/metadata.xml17
-rw-r--r--net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild49
3 files changed, 78 insertions, 0 deletions
diff --git a/net-analyzer/nagios-plugins-flameeyes/ChangeLog b/net-analyzer/nagios-plugins-flameeyes/ChangeLog
new file mode 100644
index 000000000000..626fdd2edd7a
--- /dev/null
+++ b/net-analyzer/nagios-plugins-flameeyes/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for net-analyzer/nagios-plugins-flameeyes
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins-flameeyes/ChangeLog,v 1.1 2012/11/23 16:39:04 flameeyes Exp $
+
+*nagios-plugins-flameeyes-9999 (23 Nov 2012)
+
+ 23 Nov 2012; Diego E. Pettenò <flameeyes@gentoo.org> +metadata.xml,
+ +nagios-plugins-flameeyes-9999.ebuild:
+ Initial import of a live ebuild for my own set of nagios plugins. This makes
+ it much easier to deal with their dependencies, and two out of three at the
+ time of adding are Gentoo-specific. An actual release will follow when I'll be
+ done writing a few more.
diff --git a/net-analyzer/nagios-plugins-flameeyes/metadata.xml b/net-analyzer/nagios-plugins-flameeyes/metadata.xml
new file mode 100644
index 000000000000..ab131fd14a16
--- /dev/null
+++ b/net-analyzer/nagios-plugins-flameeyes/metadata.xml
@@ -0,0 +1,17 @@
+<?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>
+</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..142a8197dca1
--- /dev/null
+++ b/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild,v 1.1 2012/11/23 16:39:04 flameeyes Exp $
+
+EAPI=5
+
+inherit git multilib
+
+EGIT_REPO_URI="git://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"
+
+RDEPEND="
+ dev-perl/Nagios-Plugin
+ sys-apps/portage
+ dev-perl/Time-Duration
+ dev-perl/TimeDate
+ smart? (
+ sys-apps/smartmontools
+ app-admin/sudo
+ )"
+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
+}