Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > ec1a0f2ec73a3ffaec7e823160844161 > files > 4

incron-0.5.9-1.fc13.src.rpm

#!/bin/bash
#
# incrond       This shell script enables the incrond daemon
#
# Author:       Ruben Kerkhof <ruben@rubenkerkhof.com>
#
# chkconfig:    - 97 03
#
# description:  This is a daemon which works like cron, but handles filesystem events
#		instead of time periods.
#               and can send notifications via mail, dbus or syslog.
# processname:  incrond
# pidfile:	/var/run/incrond.pid

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

RETVAL=0

start() {
	echo -n $"Starting incrond: "
	daemon incrond
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/incrond
}

stop() {
	echo -n $"Stopping incrond: "
	killproc incrond
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/incrond
}

restart() {
	stop
	start
}

case "$1" in
  start)
	start
	;;
  stop) 
	stop
	;;
  restart|force-reload|reload)
	restart
	;;
  condrestart)
	[ -f /var/lock/subsys/incrond ] && restart
	;;
  status)
	status incrond
	RETVAL=$?
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
	exit 1
esac

exit $RETVAL