summaryrefslogtreecommitdiff
path: root/system/cfengine/rc.cfenvd
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.cfenvd
parent588875632e3a4a12ee1748d882f8f4e9e9541291 (diff)
downloadslackbuilds-ccd4daa81cc9294c4d7beee7fc21f540b0463306.tar.gz
system/cfengine: Updated for version 2.2.8
Diffstat (limited to 'system/cfengine/rc.cfenvd')
-rw-r--r--system/cfengine/rc.cfenvd45
1 files changed, 45 insertions, 0 deletions
diff --git a/system/cfengine/rc.cfenvd b/system/cfengine/rc.cfenvd
new file mode 100644
index 0000000000..03bf800b9c
--- /dev/null
+++ b/system/cfengine/rc.cfenvd
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+# start/stop/restart/reload cfenvd
+
+# Start cfenvd:
+cfenvd_start() {
+ if [ -x /usr/sbin/cfenvd ]; then
+ echo "Starting the CFEengine environment service: /usr/sbin/cfexecd"
+ /usr/sbin/cfenvd
+ fi
+}
+
+# Stop cfenvd:
+cfenvd_stop() {
+ /bin/killall cfenvd 2> /dev/null
+}
+
+# Restart cfenvd:
+cfenvd_restart() {
+ cfenvd_stop
+ sleep 1
+ cfenvd_start
+}
+
+# Reload cfenvd:
+cfenvd_reload() {
+ /bin/killall -HUP cfenvd
+}
+
+case "$1" in
+'start')
+ cfenvd_start
+ ;;
+'stop')
+ cfenvd_stop
+ ;;
+'restart')
+ cfenvd_restart
+ ;;
+'reload')
+ cfenvd_reload
+ ;;
+*)
+ echo "usage $0 start|stop|restart|reload"
+esac