diff options
author | 2015-08-08 13:49:04 -0700 | |
---|---|---|
committer | 2015-08-08 17:38:18 -0700 | |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/darkstat/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/darkstat/files')
-rw-r--r-- | net-analyzer/darkstat/files/darkstat-confd | 27 | ||||
-rw-r--r-- | net-analyzer/darkstat/files/darkstat-initd | 59 |
2 files changed, 86 insertions, 0 deletions
diff --git a/net-analyzer/darkstat/files/darkstat-confd b/net-analyzer/darkstat/files/darkstat-confd new file mode 100644 index 000000000000..3d95a0461a06 --- /dev/null +++ b/net-analyzer/darkstat/files/darkstat-confd @@ -0,0 +1,27 @@ +# The interface to listen on +# Use only with /etc/init.d/darkstat init script. If you use +# /etc/init.d/darkstat.if init script, then this option should be ignored. +#INTERFACE="eth0" + +# The port for the embedded webserver +#PORT="667" + +# The address embedded webserver should bind to +#ADDRESS="0.0.0.0" + +# Set the filter. See tcpdump documenation for details. +#FILTER="" + +# Log daily traffic statistics into the named file, relative to the +# chroot directory (see, below). +#DAYLOGFILE="darkstat.log" + +# Other options: +DARKSTAT_OPTS="--no-promisc --no-dns --user darkstat" + +# The directory to which the program chroots after initialization. +# If you change this, please note the variable below and adjust +# the permissions accordingly. Note that if you want to use the +# --daylog option in EXTRAOPTS, the files are logged relative +# to the chroot-directory; see the man-page for details. +#CHROOT=__CHROOT__ diff --git a/net-analyzer/darkstat/files/darkstat-initd b/net-analyzer/darkstat/files/darkstat-initd new file mode 100644 index 000000000000..0f2fb5e863b1 --- /dev/null +++ b/net-analyzer/darkstat/files/darkstat-initd @@ -0,0 +1,59 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +IF=${SVCNAME##*.} + +if [ -n "${IF}" -a "${SVCNAME}" != "darkstat" ] ; then + PIDFILE=/run/darkstat.${IF}.pid +else + PIDFILE=/run/darkstat.pid +fi + +depend() { + need net +} + +chkconfig() { + if [ -n "${IF}" -a "${SVCNAME}" != "darkstat" ] ; then + if [ ! -f "/etc/conf.d/darkstat.${IF}" ] ; then + einfo "It's possible to have distinct config in /etc/conf.d/darkstat.${IF}." + fi + INTERFACE=${IF} + else + if [ ! -f "/etc/conf.d/darkstat" ] ; then + ewarn "/etc/conf.d/darkstat does not exist. Falling on defaults." + fi + fi + + if [ -z "${INTERFACE}" ]; then + ewarn "No interface specified. Trying to use eth0." + INTERFACE="eth0" + fi + + DARK_OPTS="-i ${INTERFACE}" + [ -n "${PORT}" ] && DARK_OPTS="${DARK_OPTS} -p ${PORT}" + [ -n "${ADDRESS}" ] && DARK_OPTS="${DARK_OPTS} -b ${ADDRESS}" + [ -n "${DAYLOGFILE}" ] && DARK_OPTS="${DARK_OPTS} --daylog ${DAYLOGFILE}" + + return 0 +} + +start() { + chkconfig || return 1 + + # If ${PIDFILE} exist darkstat fails to start + [ -f ${PIDFILE} ] && rm ${PIDFILE} + ebegin "Starting darkstat on ${INTERFACE}" + /sbin/start-stop-daemon --start --exec /usr/sbin/darkstat -- \ + --chroot "${CHROOT:-__CHROOT__}" --pidfile ${PIDFILE} \ + ${DARKSTAT_OPTS} ${DARK_OPTS} -f "${FILTER}" + eend $? +} + +stop() { + ebegin "Stopping darkstat on ${INTERFACE}" + /sbin/start-stop-daemon --stop --pidfile ${PIDFILE} + eend $? +} |