Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > media > main-src > by-pkgid > 87245319746990d7659a815c2e087760 > files > 7

rwho-0.17-11mdk.src.rpm

#! /bin/sh
#
# chkconfig: 345 60 20
# description: The rwho protocol lets remote users get a list of all of \
#              the users logged into a machine running the rwho daemon \
#              (similiar to finger).
# processname: rwhod

# Get config.
. /etc/sysconfig/network

# Get functions
. /etc/rc.d/init.d/functions

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

# See how we were called.
case "$1" in
  start)
	echo -n "Starting rwho services: "
	daemon rwhod
	echo
	touch /var/lock/subsys/rwhod
	;;
  stop)
	echo -n "Stopping rwho services: "
	PID=`/sbin/pidof rwhod`
	if [ -n "$PID" ] ; then
		kill $PID
	fi
	echo
	rm -f /var/lock/subsys/rwhod
	;;
  status)
	status rwhod
	;;
  restart)
	$0 stop
	$0 start
	;;
  reload)
	echo "There is no way to reload rwhod as there isn't any config file."
	;;
  *)
	echo "Usage: $0 {start|stop|status|restart}"
	exit 1
	;;
esac

exit 0