summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot/sources/openwrt/ipkg/fprobe/root
diff options
context:
space:
mode:
Diffstat (limited to 'obsolete-buildroot/sources/openwrt/ipkg/fprobe/root')
-rw-r--r--obsolete-buildroot/sources/openwrt/ipkg/fprobe/root/etc/fprobe.conf8
-rw-r--r--obsolete-buildroot/sources/openwrt/ipkg/fprobe/root/etc/init.d/fprobe23
2 files changed, 31 insertions, 0 deletions
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/fprobe/root/etc/fprobe.conf b/obsolete-buildroot/sources/openwrt/ipkg/fprobe/root/etc/fprobe.conf
new file mode 100644
index 000000000..3abfba6f9
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/ipkg/fprobe/root/etc/fprobe.conf
@@ -0,0 +1,8 @@
+# Interface to listen on
+IFNAME=any
+
+# NetFlow collector (host:port)
+REMOTE=192.168.1.100:2055
+
+# Maximum log level (0=EMERG, 1=ALERT, 2=CRIT, 3=ERR, 4=WARNING, 5=NOTICE, 6=INFO, 7=DEBUG)
+LOG_LEVEL=3
diff --git a/obsolete-buildroot/sources/openwrt/ipkg/fprobe/root/etc/init.d/fprobe b/obsolete-buildroot/sources/openwrt/ipkg/fprobe/root/etc/init.d/fprobe
new file mode 100644
index 000000000..2a61fceb9
--- /dev/null
+++ b/obsolete-buildroot/sources/openwrt/ipkg/fprobe/root/etc/init.d/fprobe
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+DEFAULT=/etc/fprobe.conf
+OPTIONS=""
+[ -f $DEFAULT ] && . $DEFAULT
+[ -n "$IFNAME" ] && OPTIONS="$OPTIONS -i $IFNAME"
+[ -n "$LOG_LEVEL" ] && OPTIONS="$OPTIONS -v $LOG_LEVEL"
+[ -n "$REMOTE" ] && OPTIONS="$OPTIONS $REMOTE"
+
+case $1 in
+ start)
+ [ -d /var/run ] || mkdir -p /var/run
+ /usr/sbin/fprobe $OPTIONS
+ ;;
+ stop)
+ [ -f /var/run/fprobe.pid ] && kill $(cat /var/run/fprobe.pid) >/dev/null 2>&1
+ ;;
+ *)
+ echo "usage: $0 (start|stop)"
+ exit 1
+esac
+
+exit $?