diff options
Diffstat (limited to 'net-analyzer/flow-tools/files/flowcapture.initd')
-rwxr-xr-x | net-analyzer/flow-tools/files/flowcapture.initd | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/net-analyzer/flow-tools/files/flowcapture.initd b/net-analyzer/flow-tools/files/flowcapture.initd new file mode 100755 index 000000000000..dc01c67d3d69 --- /dev/null +++ b/net-analyzer/flow-tools/files/flowcapture.initd @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use net +} + +start() { + ebegin "Starting flow-capture" + checkpath -d -o flows /run/flows + start-stop-daemon --start --user ${USER} --exec /usr/bin/flow-capture \ + --pidfile /run/flows/flowcapture.pid.${PORT} \ + -- ${FLOW_OPTS} >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping flow-capture" + start-stop-daemon --stop --quiet --exec /usr/bin/flow-capture \ + --pidfile /run/flows/flowcapture.pid.${PORT} + eend $? +} |