Commit 7f6a9e1d authored by Andrew Manison's avatar Andrew Manison Committed by Natanael Copa

nfdump: Changed default port for nfcapd to match fprobe; revised init script...

nfdump: Changed default port for nfcapd to match fprobe; revised init script to pass parameters to rotate command
parent 701cd736
......@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nfdump
pkgver=1.6.4
pkgrel=2
pkgrel=3
pkgdesc="The nfdump tools collect and process netflow data on the command line."
url="http://nfdump.sourceforge.net/"
arch="all"
......
# Config file for /etc/init.d/nfcapd
# Port we listen on
PORT=2205
PORT=2055
# Hostname/address we bind on - default is any available
BINDHOST=127.0.0.1
......
......@@ -28,13 +28,12 @@ start() {
[ "${COMPRESS}" == "yes" ] && OPTS="${OPTS} -z"
for optname in p:PORT b:BINDHOST j:MULTICASTGROUP i:IFACE R:REPEAT \
I:IDENT l:BASEDIR n:SOURCE s:SAMPLERATE S:SUBDIR \
T:EXTENSIONS t:INTERVAL x:ROTATECMD u:UID g:GID \
T:EXTENSIONS t:INTERVAL u:UID g:GID \
B:BUFFLEN ; do
opt="${optname/:*}" optvar="${optname/*:}"
eval optvalue="\$$optvar"
[ -n "$optvalue" ] && OPTS="${OPTS} -${opt} ${optvalue}"
done
OPTS="${OPTS}"
# Attempt to make the basedir if specified
if [ -n "${BASEDIR}" ]; then
......@@ -42,10 +41,17 @@ start() {
chown "${UID}":"${GID}" "${BASEDIR}"
fi
# Handle remote command as a special case
if [ -n "${ROTATECMD}" ]; then
start-stop-daemon --start -b --exec $BIN \
--pidfile ${PIDFILE} --make-pidfile \
-- ${OPTS} -x "${ROTATECMD}"
else
start-stop-daemon --start -b --exec $BIN \
--pidfile ${PIDFILE} --make-pidfile \
-- ${OPTS}
fi
start-stop-daemon --start -b --exec $BIN \
--pidfile ${PIDFILE} --make-pidfile \
-- ${OPTS}
eend $?
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment