#! /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 gprintf "Starting rstat services: " daemon rpc.rstatd RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rstatd ;; stop) gprintf "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=$? ;; *) gprintf "Usage: %s {start|stop|status|restart}\n" "$0" exit 1 esac exit 0