aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Manison <amanison@anselsystems.com>2012-03-26 02:03:08 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2013-01-03 15:18:21 +0000
commit789839d49cf61fe9e735b4118ddd96200b202645 (patch)
treead7bd500dd230d74c8026230aed0140811a40985
parent80a9ff52adac0c4c8df5c29a15203c133bf90860 (diff)
downloadaports-789839d49cf61fe9e735b4118ddd96200b202645.tar.bz2
aports-789839d49cf61fe9e735b4118ddd96200b202645.tar.xz
nfdump: Changed default port for nfcapd to match fprobe; revised init script to pass parameters to rotate command
(cherry picked from commit 7f6a9e1d07f276cd24ea670032c1dd351b91750c) Signed-off-by: Leonardo Arena <rnalrd@alpinelinux.org>
-rw-r--r--main/nfdump/APKBUILD2
-rw-r--r--main/nfdump/nfcapd.confd2
-rw-r--r--main/nfdump/nfcapd.initd16
3 files changed, 13 insertions, 7 deletions
diff --git a/main/nfdump/APKBUILD b/main/nfdump/APKBUILD
index 55083c8fcf..48b40ffaa8 100644
--- a/main/nfdump/APKBUILD
+++ b/main/nfdump/APKBUILD
@@ -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"
diff --git a/main/nfdump/nfcapd.confd b/main/nfdump/nfcapd.confd
index fb9afb6e32..be6155e447 100644
--- a/main/nfdump/nfcapd.confd
+++ b/main/nfdump/nfcapd.confd
@@ -1,7 +1,7 @@
# 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
diff --git a/main/nfdump/nfcapd.initd b/main/nfdump/nfcapd.initd
index 5f8506812d..028cf55ee3 100644
--- a/main/nfdump/nfcapd.initd
+++ b/main/nfdump/nfcapd.initd
@@ -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 $?
}