summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDean Bailey <alron@gentoo.org>2002-11-02 05:55:41 +0000
committerDean Bailey <alron@gentoo.org>2002-11-02 05:55:41 +0000
commit9311de520dfdc0ab8a7f3324aa8502a3e59617ce (patch)
tree3f7fc27c65302d47c04f8c428f0a1997e61549d7 /net-analyzer/nagios-core
parentnew package - calcoo: a good scientific calculator, supports RPN (diff)
downloadgentoo-2-9311de520dfdc0ab8a7f3324aa8502a3e59617ce.tar.gz
gentoo-2-9311de520dfdc0ab8a7f3324aa8502a3e59617ce.tar.bz2
gentoo-2-9311de520dfdc0ab8a7f3324aa8502a3e59617ce.zip
Nagios in full.
Diffstat (limited to 'net-analyzer/nagios-core')
-rw-r--r--net-analyzer/nagios-core/ChangeLog7
-rw-r--r--net-analyzer/nagios-core/files/digest-nagios-core-1.0_beta61
-rw-r--r--net-analyzer/nagios-core/files/nagios31
-rw-r--r--net-analyzer/nagios-core/files/nagios.conf19
-rw-r--r--net-analyzer/nagios-core/nagios-core-1.0_beta6.ebuild87
5 files changed, 145 insertions, 0 deletions
diff --git a/net-analyzer/nagios-core/ChangeLog b/net-analyzer/nagios-core/ChangeLog
new file mode 100644
index 000000000000..b9389724f9d4
--- /dev/null
+++ b/net-analyzer/nagios-core/ChangeLog
@@ -0,0 +1,7 @@
+# ChangeLog for net-analyzer/nagios-core
+# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.1 2002/11/02 05:55:41 alron Exp $
+
+*nagios-core-1.0_beta6 (1 Nov 2002)
+ 1 Nov 2002; Dean Bailey <alron@gentoo.org> nagios-core-1.0_beta6 :
+ Initial import. Ebuild submitted by Dean Bailey <alron@gentoo.org>.
diff --git a/net-analyzer/nagios-core/files/digest-nagios-core-1.0_beta6 b/net-analyzer/nagios-core/files/digest-nagios-core-1.0_beta6
new file mode 100644
index 000000000000..ae1ad6a59d6d
--- /dev/null
+++ b/net-analyzer/nagios-core/files/digest-nagios-core-1.0_beta6
@@ -0,0 +1 @@
+MD5 023cb51a54bd1659b2a6a0ac08c0c237 nagios-1.0b6.tar.gz 1612084
diff --git a/net-analyzer/nagios-core/files/nagios b/net-analyzer/nagios-core/files/nagios
new file mode 100644
index 000000000000..b8c5318ffe8b
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need net
+ use dns logger
+}
+
+start() {
+ ebegin "Starting nagios"
+ su - nagios -c "touch /var/nagios/nagios.log /var/nagios/status.sav"
+ rm -f /var/nagios/rw/nagios.cmd
+ start-stop-daemon -o --quiet --start --startas /usr/nagios/bin/nagios \
+ --pidfile /var/nagios/nagios.lock -- -d /etc/nagios/nagios.cfg
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nagios"
+ start-stop-daemon -o --quiet --stop --pidfile /var/nagios/nagios.lock
+ rm -f /var/nagios/status.log /var/nagios/nagios.tmp /var/nagios/nagios.lock /var/nagios/rw/nagios.cmd
+ eend $?
+}
+
+svc_restart() {
+ ebegin "Restarting nagios"
+ svc_stop
+ svc_start
+ eend $?
+}
diff --git a/net-analyzer/nagios-core/files/nagios.conf b/net-analyzer/nagios-core/files/nagios.conf
new file mode 100644
index 000000000000..e26cffda3737
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios.conf
@@ -0,0 +1,19 @@
+<IfDefine NAGIOS>
+
+ScriptAlias /nagios/cgi-bin/ /usr/nagios/sbin/
+<Directory "/usr/nagios/sbin/">
+ AllowOverride AuthConfig
+ Options ExecCGI
+ Order allow,deny
+ Allow from all
+</Directory>
+
+
+Alias /nagios/ /usr/nagios/share/
+<Directory "/usr/nagios/share">
+ AllowOverride AuthConfig
+ Order allow,deny
+ Allow from all
+</Directory>
+
+</IfDefine>
diff --git a/net-analyzer/nagios-core/nagios-core-1.0_beta6.ebuild b/net-analyzer/nagios-core/nagios-core-1.0_beta6.ebuild
new file mode 100644
index 000000000000..c5ea31f69ceb
--- /dev/null
+++ b/net-analyzer/nagios-core/nagios-core-1.0_beta6.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-1.0_beta6.ebuild,v 1.1 2002/11/02 05:55:41 alron Exp $
+DESCRIPTION="Nagios #PV core - Host and service monitor cgi, docs etc..."
+HOMEPAGE="http://www.nagios.org/"
+SRC_URI="http://telia.dl.sourceforge.net/sourceforge/nagios/nagios-1.0b6.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+DEPEND=">=jpeg-6b-r2
+ >=libpng-1.2.4
+ >=libgd-1.8.3-r5
+ >=perl-5.6.1-r7
+ >=traceroute-1.4_p12
+ >=mailx-8.1.1.11
+ >=apache-1.3.27-r1"
+S="${WORKDIR}/nagios-1.0b6"
+
+src_compile() {
+ ./configure \
+ --host=${CHOST} \
+ --prefix=/usr/nagios \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --enable-embedded-perl \
+ --with-perlcache \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man || die "./configure failed"
+ emake all || die
+}
+
+src_install() {
+ dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING
+ make DESTDIR=${D} COMMAND_OPTS="" INSTALL_OPTS="" install install-config install-commandmode || die
+ insinto /etc/apache/conf/addon-modules
+ doins ${FILESDIR}/nagios.conf
+ exeinto /etc/init.d
+ doexe ${FILESDIR}/nagios
+}
+pkg_preinst() {
+
+ userdel nagios 2> /dev/null
+ if ! groupmod nagios; then
+ groupadd -g 75 nagios 2> /dev/null || \
+ die "Failed to create nagios group"
+ fi
+ useradd -u 75 -g nagios -s /dev/null -d /var/empty -c "nagios" nagios || \
+ die "Failed to create nagios user"
+ chown -R nagios:nagios ${D}/etc/nagios || die "Failed Chown of ${D}/etc/nagios"
+ chown -R nagios:nagios ${D}/usr/nagios || die "Failed Chown of ${D}/usr/nagios"
+ chown -R nagios:nagios ${D}/var/nagios || die "Failed Chown of ${D}/var/nagios"
+ chown nagios:apache ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+}
+pkg_postinst() {
+ einfo
+ einfo "Remember to edit the config files in /etc/nagios"
+ einfo "Also, if you want nagios to start at boot time"
+ einfo "remember to execute rc-update add nagios default"
+ einfo
+ einfo "To have nagios visable on the web, please do the following:"
+ einfo "1. Execute the command:"
+ einfo " \"ebuild /var/db/pkg/net-misc/${PF}/${PF}.ebuild config\""
+ einfo " 2. Edit /etc/conf.d/apache and add \"-D NAGIOS\""
+ einfo
+ einfo "That will make nagios's web front end visable via"
+ einfo "http://localhost/nagios/"
+ einfo
+ einfo "The Apache config file for nagios will be in"
+ einfo "/etc/apache/conf/addon-modules/ with the name of"
+ einfo "nagios.conf."
+ einfo "Also, if your kernel has /proc protection, nagios"
+ einfo "will not be happy as it relies on accessing the proc"
+ einfo "filesystem."
+ einfo
+}
+
+pkg_config() {
+ echo "Include conf/addon-modules/nagios.conf" \
+ >> ${ROOT}/etc/apache/conf/apache.conf
+ einfo
+ einfo "Remember to edit /etc/conf.d/apache and add \"-D NAGIOS\""
+ einfo
+}
+pkg_prerm() {
+ /etc/init.d/nagios stop
+}