summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/ndoutils/files/ndo2db.init-nagios3')
-rwxr-xr-xnet-analyzer/ndoutils/files/ndo2db.init-nagios325
1 files changed, 25 insertions, 0 deletions
diff --git a/net-analyzer/ndoutils/files/ndo2db.init-nagios3 b/net-analyzer/ndoutils/files/ndo2db.init-nagios3
new file mode 100755
index 000000000000..60913254ab1d
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndo2db.init-nagios3
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depends() {
+ before nagios
+ need mysql
+}
+
+start() {
+ ebegin "Starting ndo2db"
+ if [ -S /var/nagios/ndo.sock ] ; then
+ rm -f /var/nagios/ndo.sock
+ fi
+ start-stop-daemon --start --quiet --exec /usr/bin/ndo2db \
+ -- -c /etc/nagios/ndo2db.cfg
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ndo2db"
+ start-stop-daemon --stop --quiet --exec /usr/bin/ndo2db
+ eend $?
+}