freebsd-ports/net-mgmt/bandwidthd/files/bandwidthd.sh
Kirill Ponomarev 565a923745 bandwidthd tracks usage of TCP/IP network subnets and
builds HTML files with graphs to display network utilization.
Charts are built by individual IP. It color codes HTTP,
TCP, UDP, ICMP, VPN, and P2P traffic. Unlike MRTG, it tracks
each individual IP address, not the status of any particular
link.

PR:		58830
Submitted by:	Clement Laforet <sheepkiller@cultdeadsheep.org>
2003-11-06 09:15:28 +00:00

22 lines
492 B
Bash

#!/bin/sh
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 1
fi
case "$1" in
start)
[ -x ${PREFIX}/bandwidthd ] && \
[ -r ${PREFIX}/bandwidthd/etc/bandwidthd.conf ] && \
cd ${PREFIX}/bandwidthd && ./bandwidthd &&\
echo -n ' bandwidthd'
;;
stop)
killall bandwidthd && echo -n ' bandwidthd'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac