summaryrefslogtreecommitdiff
path: root/frontends/Rexfile
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-03-21 20:07:50 +0200
committerPaul Buetow <paul@buetow.org>2024-03-21 20:07:50 +0200
commit95c2365df04de6b8bfa964f672ab77aeb3ec792e (patch)
treea298a92fa6ff56c1f4baa9e91bb7e6d7e37706ad /frontends/Rexfile
parent4eb3653ae07f2afc84d7bc4534f4ed2dbf8f2700 (diff)
configure minutely cron job for auto-dns failover
Diffstat (limited to 'frontends/Rexfile')
-rw-r--r--frontends/Rexfile8
1 files changed, 8 insertions, 0 deletions
diff --git a/frontends/Rexfile b/frontends/Rexfile
index 08e730b..652d8c4 100644
--- a/frontends/Rexfile
+++ b/frontends/Rexfile
@@ -356,6 +356,14 @@ task 'nsd_failover', group => 'frontends',
mode => '500';
append_if_no_such_line '/etc/daily.local', '/usr/local/bin/dns-failover.ksh';
+
+ file '/tmp/root.cron',
+ ensure => 'file',
+ content => "*\t*\t*\t*\t*\t-ns /usr/local/bin/dns-failover.ksh",
+ mode => '600';
+
+ run '{ crontab -l -u root ; cat /tmp/root.cron; } | uniq | crontab -u root -';
+ run 'rm /tmp/root.cron';
};
desc 'Setup DTail';