summaryrefslogtreecommitdiff
blob: e03d493ee10dc2930996e7b10d4d05cedbda5163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/sbin/openrc-run
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

PORT=${PORT:=2055}
PIDFILE=${PIDFILE:=/run/flows/flowcapture.pid.${PORT}}

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 ${PIDFILE} \
		-- ${FLOW_OPTS} >/dev/null 2>&1
	eend $?
}

stop() {
	ebegin "Stopping flow-capture"
	start-stop-daemon --stop --quiet --exec /usr/bin/flow-capture \
		--pidfile ${PIDFILE}
	eend $?
}