diff options
Diffstat (limited to 'system/cfengine/rc.cfengine')
-rw-r--r-- | system/cfengine/rc.cfengine | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/system/cfengine/rc.cfengine b/system/cfengine/rc.cfengine index a58103c72a..08a3300d62 100644 --- a/system/cfengine/rc.cfengine +++ b/system/cfengine/rc.cfengine @@ -1,50 +1,52 @@ #!/bin/sh -# Start cfengine: -cfengine_start() { +# start/stop/restart/reload cfexecd + +# 'cfexecd' may be used to capture cfagent output and send it as +# mail when run. All control parameters are set in cfagent.conf. +# cfagent can in turn start any other service (e.g. cfenvd, cfservd) + +# Start cfexecd: +cfexecd_start() { if [ -x /usr/sbin/cfexecd ]; then # Make sure localhost keys exist first if [ ! -f /var/cfengine/ppkeys/localhost.priv ]; then /usr/sbin/cfkey fi - echo "Starting Cfengine: /usr/sbin/cfexecd" + echo "Starting the CFEngine scheduler service: /usr/sbin/cfexecd" /usr/sbin/cfexecd fi } -# Stop cfengine: -cfengine_stop() { - /bin/killall cfenvd 2> /dev/null +# Stop cfexecd: +cfexecd_stop() { /bin/killall cfexecd 2> /dev/null - /bin/killall cfservd 2> /dev/null } -# Restart cfengine: -cfengine_restart() { - cfengine_stop +# Restart cfexecd: +cfexecd_restart() { + cfexecd_stop sleep 1 - cfengine_start + cfexecd_start } -# Reload cfengine: -cfengine_reload() { - /bin/killall -HUP cfenvd +# Reload cfexecd: +cfexecd_reload() { /bin/killall -HUP cfexecd - /bin/killall -HUP cfservd } case "$1" in 'start') - cfengine_start + cfexecd_start ;; 'stop') - cfengine_stop + cfexecd_stop ;; 'restart') - cfengine_restart + cfexecd_restart ;; 'reload') - cfengine_reload + cfexecd_reload ;; *) echo "usage $0 start|stop|restart|reload" |