Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 906fab9b037e667950cf6d9004747878 > files > 7

rusers-0.17-15mdv2008.0.src.rpm

#! /bin/sh
#
# chkconfig: 345 60 20
# description: The rstat protocol allows users on a network to retrieve \
#              performance metrics for any machine on that network.
# processname: rpc.rstatd

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

# Get config.
. /etc/sysconfig/network

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

# See how we were called.
case "$1" in
  start)
	status portmap > /dev/null
	RETVAL=$?
	[ $RETVAL -ne 0 ] && /etc/rc.d/init.d/portmap start
	echo -n "Starting rstat services: "
	daemon rpc.rstatd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/rstatd
	;;
  stop)
	echo -n "Stopping rstat services: "
	killproc rpc.rstatd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rstatd
	;;
  status)
	status rpc.rstatd
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  *)
	echo "Usage: $0 {start|stop|status|restart}"
	exit 1
esac

exit 0