Re: How to start cfengine's cfd automatically?
>>>>> "jtr" == jtr <jtr@mailout.uni-bonn.de> writes:
jtr> is someone working with cfengine and has a working script which
jtr> starts its daemon cfd on bootup? If so, I would appreciate very
jtr> much if he/she would send me a copy. (Any other hints are welcome
jtr> as well of course).
I have the following /etc/init.d/cfd script which starts up the daemon
OK:
#! /bin/sh
# /etc/init.d/cfd: start and stop the "cfengine" daemon
test -x /usr/sbin/cfd || exit 0
# Configurable options:
CFINPUTS=/etc/cfengine
export CFINPUTS
case "$1" in
start)
echo -n "Starting cfengine daemon: cfd"
CFINPUTS=/etc/cfengine
export CFINPUTS
start-stop-daemon --start --quiet --exec /usr/sbin/cfd
echo "."
;;
stop)
echo -n "Stopping cfengine daemon: cfd"
start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/cfd
echo "."
;;
*)
echo "Usage: /etc/init.d/cfd {start|stop}"
exit 1
esac
exit 0
--
Gilbert Laycock email: gtl1@mcs.le.ac.uk
Maths and Computer Science, http://www.mcs.le.ac.uk/~glaycock
Leicester University phone: (+44) 116 252 3902
Reply to: