#! /bin/sh
#
# chkconfig: - 60 20
# description: The rstatd protocol allows users on a network to access \
#              uptime information for any machine on that network.
# processname: rpc.rstatd

# Get config.
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network

# Check that networking is up.
if [ ${NETWORKING} = "no" ]
then
  exit 0
fi

# See how we were called.
case "$1" in
  start)
  echo -n "Starting rstatd services: "
  daemon rpc.rstatd
  echo
  touch /var/lock/subsys/rstatd
  ;;
  stop)
  echo -n "Stopping rstatd services: "
  killproc rpc.rstatd
  echo
  rm -f /var/lock/subsys/rstatd
  ;;
  status)
  status rpc.rstatd
  ;;
  restart)
  $0 stop
  $0 start
  ;;
  *)
  echo "Usage: rstatd {start|stop|status|restart}"
  exit 1
esac

exit 0

