summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJulien Dessaux2017-03-10 13:50:24 +0100
committerJulien Dessaux2017-03-10 14:11:02 +0100
commit6e2f04d2859bc432622f82f9b2d00c88557a24c2 (patch)
treea983b33767c3e8101e62fbe4a96495ed59d38f71 /templates
parentAdded cfengine_modules submodule (diff)
downloadmasterfiles-6e2f04d2859bc432622f82f9b2d00c88557a24c2.tar.gz
masterfiles-6e2f04d2859bc432622f82f9b2d00c88557a24c2.tar.bz2
masterfiles-6e2f04d2859bc432622f82f9b2d00c88557a24c2.zip
Added cfengine watchdog policy
Diffstat (limited to 'templates')
-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}}