Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > 7ce96ef8812642cacf5f3f6b5daea15d > files > 6

rusers-0.17-12mdk.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