diff options
author | bouyer <bouyer@pkgsrc.org> | 2003-03-24 15:24:39 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2003-03-24 15:24:39 +0000 |
commit | 3a19738d58bae7dc6379aa88d4c0d8185ce213bd (patch) | |
tree | 8d8daa30048406d5604edb3effc620b49e641588 /net/smokeping/files | |
parent | d64eaae580f495772c84ae809278320f8640483e (diff) | |
download | pkgsrc-3a19738d58bae7dc6379aa88d4c0d8185ce213bd.tar.gz |
Import of smokeping 1.19:
SmokePing can measure latency, latency distribution and packet loss
in your network. SmokePing uses RRDtool to maintain a longterm datastore
and to draw pretty graphs, giving up to the minute information
on the state of each network connection. SmokePing can also raise
alarms based on latency and loss patterns.
Diffstat (limited to 'net/smokeping/files')
-rwxr-xr-x | net/smokeping/files/smokeping.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/net/smokeping/files/smokeping.sh b/net/smokeping/files/smokeping.sh new file mode 100755 index 00000000000..3edd0cebc80 --- /dev/null +++ b/net/smokeping/files/smokeping.sh @@ -0,0 +1,41 @@ +#! /bin/sh +# +# $NetBSD: smokeping.sh,v 1.1.1.1 2003/03/24 15:24:39 bouyer Exp $ +# +# PROVIDE: smokeping +# REQUIRE: DAEMON + +name="smokeping" +command="@PREFIX@/bin/smokeping" +pidfile="/var/run/${name}.pid" + +cmd=${1:-start} + +case ${cmd} in +start) + if [ -x ${command} ]; then + echo "Starting ${name}." + ${command} > /dev/null 2>&1 + fi + ;; +stop) + if [ -f ${pidfile} ]; then + pid=`head -1 ${pidfile}` + echo "Stopping ${name}." + kill ${pid} + fi + ;; +restart) + $0 stop + $0 start + ;; +status) + if [ -f ${pidfile} ]; then + pid=`head -1 ${pidfile}` + echo "${name} is running as pid ${pid}." + else + echo "${name} is not running." + fi + ;; +esac +exit 0 |