Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > aee9d39adb11690d34c7b1b68388021d > files > 2

nfswatch-4.99.9-2mdv2008.0.src.rpm

#!/bin/sh
#
# Startup script for the nfswatch daemon
#
# chkconfig: 345 62 18
# description: An NFS traffic monitoring tool
# processname: nfswatch
# pidfile: /var/run/nfswatch.pid
# config: /etc/sysconfig/nfswatch

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

# Source networking configuration.
. /etc/sysconfig/network

# Check for and source configuration file otherwise set defaults
[ -f /etc/sysconfig/nfswatch ] && . /etc/sysconfig/nfswatch

[ -x /usr/sbin/nfswatch ] || exit 0

# See how we were called.
case "$1" in
  start)
	echo -n "Starting nfswatch: "
	daemon nfswatch -lf /var/log/nfswatch.log -bg ${NFSWATCH_OPTIONS}
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/nfswatch
	;;
  stop)
	echo -n "Stopping nfswatch: "
	killproc nfswatch
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/nfswatch
	;;
  status)
	status nfswatch
	RETVAL=$?
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  *)
	echo "Usage: nfswatch {start|stop|status|restart|reload}"
	exit 1
esac

exit $RETVAL