summaryrefslogtreecommitdiff
path: root/system/cfengine/rc.cfengine
diff options
context:
space:
mode:
authorMenno E. Duursma <druiloor@zonnet.nl>2010-05-11 22:26:30 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:26:30 +0200
commitccd4daa81cc9294c4d7beee7fc21f540b0463306 (patch)
tree52917e2ff28b4efc8d477ad57c63c445b65e0bfe /system/cfengine/rc.cfengine
parent588875632e3a4a12ee1748d882f8f4e9e9541291 (diff)
downloadslackbuilds-ccd4daa81cc9294c4d7beee7fc21f540b0463306.tar.gz
system/cfengine: Updated for version 2.2.8
Diffstat (limited to 'system/cfengine/rc.cfengine')
-rw-r--r--system/cfengine/rc.cfengine40
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"