summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Scherbaum <dertobi123@gentoo.org>2011-07-27 16:14:39 +0000
committerTobias Scherbaum <dertobi123@gentoo.org>2011-07-27 16:14:39 +0000
commitab5bcc2a9a159a32addad73f4bd66aa94d55fd0e (patch)
tree8a3fd6a231a69f645e954757e783e1265def2d2f /net-analyzer/nagios-core/files
parentRevision bump to fix multilib strictness. Fixes bug #376627. (diff)
downloadgentoo-2-ab5bcc2a9a159a32addad73f4bd66aa94d55fd0e.tar.gz
gentoo-2-ab5bcc2a9a159a32addad73f4bd66aa94d55fd0e.tar.bz2
gentoo-2-ab5bcc2a9a159a32addad73f4bd66aa94d55fd0e.zip
Version bump and cleanup, #376471
(Portage version: 2.1.10.7/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/nagios-core/files')
-rw-r--r--net-analyzer/nagios-core/files/nagios57
-rw-r--r--net-analyzer/nagios-core/files/nagios-3.3.1-htmlmakefile.patch14
2 files changed, 71 insertions, 0 deletions
diff --git a/net-analyzer/nagios-core/files/nagios b/net-analyzer/nagios-core/files/nagios
new file mode 100644
index 000000000000..cc4bad3e0ffd
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright 1999-2011 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.12 2011/07/27 16:14:39 dertobi123 Exp $
+
+opts="${opts} reload checkconfig"
+
+depend() {
+ need net
+ use dns logger firewall
+ after mysql postgresql
+}
+
+reload()
+{
+ checkconfig || return 1
+ ebegin "Reloading configuration"
+ killall -HUP nagios &>/dev/null
+ eend $?
+}
+
+checkconfig() {
+ # Silent Check
+ /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg &>/dev/null && return 0
+
+ # Now we know there's problem - run again and display errors
+ /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg
+ eend $? "Configuration Error. Please fix your configfile"
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting nagios"
+ touch /var/nagios/nagios.log /var/nagios/status.sav
+ chown nagios:nagios /var/nagios/nagios.log /var/nagios/status.sav
+ rm -f /var/nagios/rw/nagios.cmd
+ start-stop-daemon --quiet --start --startas /usr/nagios/bin/nagios \
+ -e HOME="/var/nagios/home" --pidfile /var/nagios/nagios.lock \
+ -- -d /etc/nagios/nagios.cfg
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nagios"
+ start-stop-daemon --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() {
+ checkconfig || return 1
+ ebegin "Restarting nagios"
+ svc_stop
+ svc_start
+ eend $?
+}
+
diff --git a/net-analyzer/nagios-core/files/nagios-3.3.1-htmlmakefile.patch b/net-analyzer/nagios-core/files/nagios-3.3.1-htmlmakefile.patch
new file mode 100644
index 000000000000..c033c9843c10
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios-3.3.1-htmlmakefile.patch
@@ -0,0 +1,14 @@
+--- html/Makefile.in.orig 2011-07-27 16:06:58.000000000 +0200
++++ html/Makefile.in 2011-07-27 16:07:10.000000000 +0200
+@@ -75,9 +75,9 @@
+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos; done
+ for file in includes/*.*; \
+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes; done
+- for file in includes/rss/*; \
++ for file in includes/rss/*.*; \
+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes/rss; done
+- for file in includes/rss/extlib/*; \
++ for file in includes/rss/extlib/*.*; \
+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes/rss/extlib; done
+
+ install-unstripped: