Sophie

Sophie

distrib > Mandriva > 8.1 > i586 > by-pkgid > dc430da5aacc0cead97c2e2ef0c82561 > files > 4

cfengine-1.6.3-4mdk.i586.rpm

#!/bin/sh
#
# chkconfig:   345 55 45
# description: The configuration daemon (commonly called cfd) is \
#              responsible for providing remote launch of cfengine.
# processname: cfd
# config:      /etc/cfengine/cfd.conf
# hide:        false

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

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

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

CFINPUTS=/etc/cfengine
export CFINPUTS

[ -x /usr/sbin/cfd -a -r $CFINPUTS/cfd.conf ] || exit 0

# See how we were called.
case "$1" in
	start)
		# Start daemons.
		echo -n "Starting cfd: "
		daemon cfd
		echo
		touch /var/lock/subsys/cfd
		;;
	stop)
		# Stop daemons.
		echo -n "Shutting down cfd: "
		killproc cfd
		echo
		rm -f /var/lock/subsys/cfd
        	;;
	restart)
		$0 stop
		$0 start
		;;
	status)
		status cfd
		exit $?
		;;
	*)
		echo "Usage: $0 {start|stop|restart|status}"
		exit 1
esac

exit 0

# === End of File ===