summaryrefslogtreecommitdiff
path: root/cfengine
diff options
context:
space:
mode:
Diffstat (limited to 'cfengine')
-rw-r--r--cfengine/watchdog.cf8
1 files changed, 7 insertions, 1 deletions
diff --git a/cfengine/watchdog.cf b/cfengine/watchdog.cf
index 22d045d..baf3993 100644
--- a/cfengine/watchdog.cf
+++ b/cfengine/watchdog.cf
@@ -6,7 +6,7 @@ bundle agent cfengine_watchdog
!systemd::
"data" string => '{"systemd": false}';
files:
- any::
+ !alpinelinux::
"/etc/cron.d/cfengine_watchdog"
create => "true",
perms => system_owned("444"),
@@ -14,6 +14,12 @@ bundle agent cfengine_watchdog
template_method => "mustache",
template_data => parsejson("$(data)"),
classes => if_repaired("cfengine_watchdog_repaired");
+ alpinelinux::
+ "/etc/crontabs/root"
+ create => "false",
+ perms => system_owned("400"),
+ edit_line => append_if_no_line("* * * * * [ -x \"/var/lib/cfengine/bin/cf-execd\" ] && if ! /usr/bin/pgrep cf-execd > /dev/null; then \"/var/lib/cfengine/bin/cf-execd\"; fi"),
+ classes => if_repaired("cfengine_watchdog_repaired");
reports:
any::
"$(this.bundle): /etc/cron.d/cfengine_watchdog repaired" ifvarclass => "cfengine_watchdog_repaired";