#!/bin/sh
#
# rquotad       This shell script takes care of starting and stopping
#               the remote Quota daemon.
#
# Version:      @(#) /etc/rc.d/init.d/rquotad 1.2 Sat Oct 1996
#
# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#               Modified by Joerg Mertin, <smurphy@linux.de>

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

# Source networking configuration.
if [ ! -f /etc/sysconfig/network ] ; then
    exit 0
fi

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

[ -f /sbin/rpc.rquotad ] || exit 0

# See how we were called.
case "$1" in
  start)
	# Start daemons.
	echo -n "Starting remote Quota Server: "
	daemon rpc.rquotad
	echo
	touch /var/lock/subsys/rquotad
	;;
  stop)
	# Stop daemons.
	echo -n "Shutting remote Quota server: "
	killproc rpc.rquotad
	echo
	rm -f /var/lock/subsys/rquotad
	;;
  *)
	echo "Usage: rquotad {start|stop}"
	exit 1
esac

exit 0

