summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/daemonlogger/files/daemonlogger-initd')
-rw-r--r--net-analyzer/daemonlogger/files/daemonlogger-initd26
1 files changed, 26 insertions, 0 deletions
diff --git a/net-analyzer/daemonlogger/files/daemonlogger-initd b/net-analyzer/daemonlogger/files/daemonlogger-initd
new file mode 100644
index 000000000..3d8c36af3
--- /dev/null
+++ b/net-analyzer/daemonlogger/files/daemonlogger-initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+if [[ -n "${TAP}" ]] ; then
+ DAEMONLOGGER_OPTS="${DAEMONLOGGER_OPTS} -o ${TAP}"
+fi
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting daemonlogger on ${IFACE}"
+ start-stop-daemon --start --exec /usr/sbin/daemonlogger \
+ --pidfile /var/run/daemonlogger_$IFACE.pid --background \
+ -- -P /var/run -p daemonlogger_$IFACE.pid ${DAEMONLOGGER_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping daemonlogger on ${IFACE}"
+ start-stop-daemon --stop --quiet --retry 5 --pidfile /var/run/daemonlogger_$IFACE.pid
+ eend $?
+}