diff options
Diffstat (limited to 'net-analyzer/daemonlogger/files')
-rw-r--r-- | net-analyzer/daemonlogger/files/daemonlogger-confd | 19 | ||||
-rw-r--r-- | net-analyzer/daemonlogger/files/daemonlogger-initd | 26 |
2 files changed, 45 insertions, 0 deletions
diff --git a/net-analyzer/daemonlogger/files/daemonlogger-confd b/net-analyzer/daemonlogger/files/daemonlogger-confd new file mode 100644 index 000000000..39240d3a0 --- /dev/null +++ b/net-analyzer/daemonlogger/files/daemonlogger-confd @@ -0,0 +1,19 @@ +# Config file for /etc/init.d/daemonlogger. +# Note that you can run daemonlogger as a non-daemon without the init script. + +# Set the listening interface. +IFACE="eth0" + +# Set the output interface for tapping. +# Note that this disables the logging option below. +#TAP="eth1" + +# The directory to which logged pcap-files are stored. +LOGDIR="/var/log/daemonlogger" + +# The user/group to which the program drops privileges. +# Note that if you change this, please adjust the permissions of LOGDIR accordingly. +USER="daemonlogger" + +# This gathers the above options. +DAEMONLOGGER_OPTS="-d -i $IFACE -u $USER -g $USER -l $LOGDIR" 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 $? +} |