summaryrefslogtreecommitdiff
path: root/templates/cfengine
diff options
context:
space:
mode:
Diffstat (limited to 'templates/cfengine')
-rw-r--r--templates/cfengine/cfengine_watchdog6
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/cfengine/cfengine_watchdog b/templates/cfengine/cfengine_watchdog
new file mode 100644
index 0000000..a998511
--- /dev/null
+++ b/templates/cfengine/cfengine_watchdog
@@ -0,0 +1,6 @@
+###############################################################################
+# \_o< WARNING : This file is being managed by cfengine! >o_/ #
+# ~~~~ ~~~~ #
+###############################################################################
+{{#systemd}}* * * * * root [ -x "/var/cfengine/bin/cf-execd" ] && if ! /bin/systemctl status cfengine3 > /dev/null; then /bin/systemctl start cfengine3; fi{{/systemd}}
+{{^systemd}}* * * * * root [ -x "/var/cfengine/bin/cf-execd" ] && if ! /usr/bin/pgrep cf-execd > /dev/null; then "/var/cfengine/bin/cf-execd"; fi{{/systemd}}