From 5ee192e1fd3104d394d32b24a4b802fcf98ad3b5 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 10 Apr 2008 12:14:48 +0000 Subject: [PATCH] =?utf8?q?Neues=20Unterprojekt=20PNP=20f=C3=BCr=20Nagios?= =?utf8?q?=203.x?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.brehm-online.com/svn/portage@58 18afd0d2-9f2f-0410-a0ac-b8d70fd81a6b --- net-analyzer/pnp/Manifest | 3 ++ net-analyzer/pnp/files/npcd | 31 ++++++++++++++ net-analyzer/pnp/pnp-0.4.7.ebuild | 69 +++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 net-analyzer/pnp/Manifest create mode 100644 net-analyzer/pnp/files/npcd create mode 100644 net-analyzer/pnp/pnp-0.4.7.ebuild diff --git a/net-analyzer/pnp/Manifest b/net-analyzer/pnp/Manifest new file mode 100644 index 0000000..c1ad71f --- /dev/null +++ b/net-analyzer/pnp/Manifest @@ -0,0 +1,3 @@ +AUX npcd 803 RMD160 f516c730ecbd74be6a9f17a2d33f6f174a591650 SHA1 9be36a512b1c5e934f9ba18d74dbd986f4df9dbb SHA256 a4e72d13330576ff2e6400144327cf8e8eaf4016146b125c2ff5406d6ce38f82 +DIST pnp-0.4.7.tar.gz 299261 RMD160 d1c8bc1a4b6a97e13ffb686d99dc41c333a0b4d9 SHA1 a326149d0a449c9c9af718c622d80a3b4c40f6e3 SHA256 34307d9e7a045b921403d98ea52149296ebf988de93834ad40e922d298ae703c +EBUILD pnp-0.4.7.ebuild 2176 RMD160 6f499784de0cffc1963664914b00b02f2722ece0 SHA1 a16d442f2326b392b24f67a3bbaa7af0b261a4b0 SHA256 0bc0f49dd93ec41558cf144ab8d1bf3414a7f78bc259ea2055d75456b867550e diff --git a/net-analyzer/pnp/files/npcd b/net-analyzer/pnp/files/npcd new file mode 100644 index 0000000..fa3d6ed --- /dev/null +++ b/net-analyzer/pnp/files/npcd @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/files/nagios,v 1.10 2007/05/08 21:36:14 dertobi123 Exp $ + +depend() { + need net + before nagios +} + +start() { + ebegin "Starting PNP 4 Nagios" + start-stop-daemon --quiet --start --startas /usr/sbin/npcd \ + -e HOME="/var/nagios/home" --pidfile /var/run/npcd.pid \ + -- -d -f /etc/nagios/pnp/npcd.cfg + eend $? +} + +stop() { + ebegin "Stopping PNP 4 Nagios" + start-stop-daemon --quiet --stop --pidfile /var/run/npcd.pid + eend $? +} + +svc_restart() { + ebegin "Restarting PNP 4 Nagios" + svc_stop + svc_start + eend $? +} + diff --git a/net-analyzer/pnp/pnp-0.4.7.ebuild b/net-analyzer/pnp/pnp-0.4.7.ebuild new file mode 100644 index 0000000..8e33d9d --- /dev/null +++ b/net-analyzer/pnp/pnp-0.4.7.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="1" + +inherit eutils + +DESCRIPTION="Addon for the Nagios Network Monitoring System. PNP provides easy to use, easy to configure RRDTools based performance charts." +HOMEPAGE="http://www.pnp4nagios.org/start" +SRC_URI="http://switch.dl.sourceforge.net/sourceforge/pnp4nagios/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" +RESTRICT="nomirror,strip" + +DEPEND=">=net-analyzer/nagios-2 + dev-lang/perl + >=net-analyzer/rrdtool-1.2 + >=dev-lang/php-4.3 +" +RDEPEND="${DEPEND}" + +src_compile() { + econf \ + --prefix=/usr \ + --bindir=/usr/sbin \ + --sbindir=/usr/$(get_libdir)/nagios/cgi-bin \ + --datadir=/usr/share/nagios/htdocs \ + --localstatedir=/var/nagios \ + --sysconfdir=/etc/nagios/pnp \ + --libexecdir=/usr/$(get_libdir)/nagios/plugins \ + --htmldir=/usr/share/nagios/htdocs/pnp \ + --with-nagios-user=nagios \ + --with-nagios-group=nagios \ + --with-rrdtool=/usr/bin/rrdtool \ + --with-perfdata-dir=/var/nagios/perfdata \ + --with-perfdata-spool-dir=/var/nagios/spool/perfdata \ + || die "econf failed" + + emake -j1 all || die "emake failed" +} + + +src_install() { + dodoc AUTHORS BUGS ChangeLog COPYING INSTALL NEWS README README.npcd README.pnpsender THANKS TODO + + emake DESTDIR="${D}" HTMLDIR=/usr/share/nagios/htdocs/pnp install + emake DESTDIR="${D}" HTMLDIR=/usr/share/nagios/htdocs/pnp install-config + + cat "${D}"/etc/nagios/pnp/npcd.cfg-sample | sed 's#^[ ]*perfdata_file_run_cmd[ ]*=.*#perfdata_file_run_cmd = /usr/lib/nagios/plugins/process_perfdata.pl#' >"${D}"/etc/nagios/pnp/npcd.cfg + #cat "${D}"/etc/nagios/pnp/npcd.cfg-sample >"${D}"/etc/nagios/pnp/npcd.cfg + rm "${D}"/etc/nagios/pnp/npcd.cfg-sample + chown nagios:nagios "${D}"/etc/nagios/pnp/npcd.cfg + chmod 664 "${D}"/etc/nagios/pnp/npcd.cfg + mv "${D}"/etc/nagios/pnp/process_perfdata.cfg-sample "${D}"/etc/nagios/pnp/process_perfdata.cfg + mv "${D}"/etc/nagios/pnp/rra.cfg-sample "${D}"/etc/nagios/pnp/rra.cfg + + keepdir /etc/nagios/pnp + keepdir /var/nagios + keepdir /var/nagios/perfdata + keepdir /var/nagios/spool/perfdata + + doinitd "${FILESDIR}"/npcd + + +} -- 2.39.5