From 52f0255bf2a4a016584a34e40326f0735ed79a5c Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Tue, 10 Oct 2017 13:40:39 +0200 Subject: Initialized alpine linux support --- cfengine/watchdog.cf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cfengine') 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"; -- cgit v1.2.3