#!/bin/bash
#Cfengine daemon startup script
test -x /usr/sbin/cfd || exit 0
NAME=cfd
PATH=/usr/bin:/bin:/usr/sbin:/sbin
CFINPUTS=/etc/cfengine/debian-edu
export CFINPUTS


case $1 in

 start) echo "Starting Cfengine daemon: cfd"
        /usr/sbin/cfd
        exit 0
        ;;

 stop)  echo "Trying to kill Cfengine daemon"
          kill -9 `/bin/ps aux | /usr/bin/awk '/cfd/ {print $2}'`
	  exit 0
        ;;
 *)	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop}" >&2
	exit 1
	;;
			 

esac


