#!/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. gprintf "Starting cfd: " daemon cfd echo touch /var/lock/subsys/cfd ;; stop) # Stop daemons. gprintf "Shutting down cfd: " killproc cfd echo rm -f /var/lock/subsys/cfd ;; restart) $0 stop $0 start ;; status) status cfd exit $? ;; *) gprintf "Usage: %s {start|stop|restart|status}\n" "$0" exit 1 esac exit 0 # === End of File ===