#!/bin/sh
#
# Startup script for tptestd
#
# chkconfig: 2345 20 20
#
# description: tptestd is a network throughput measurement program
#
# processname : tptestd
# pidfile     : /var/run/tptestd.pid
# config      : /etc/tptest.conf

# Source function library.
. /etc/rc.d/init.d/functions

INITLOG_ARGS=""

nacctd=/usr/sbin/tptestd
OPTIONS=""
RETVAL=0

start() {
	echo -n $"Starting tptestd: "
	daemon $tptestd $OPTIONS
	RETVAL=$?
	echo
	[ $RETVAL = 0 ] && touch /var/lock/subsys/tptestd
	return $RETVAL
}
stop() {
	echo -n $"Stopping tptestd: "
	killproc $tptestd
	RETVAL=$?
	echo
	[ $RETVAL = 0 ] && rm -f /var/lock/subsys/tptestd /var/run/tptestd.pid
}

case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	status $tptestd
	;;
  restart)
	stop
	start
	;;
  reload)
	echo -n $"Reloading tptestd: "
	killproc $tptestd -HUP
	RETVAL=$?
	echo
	;;
  *)
	echo $"Usage: tptestd {start|stop|restart|reload|status}"
	exit 1
esac

exit $RETVAL
