From 253e0ba76148286b5bd69a11225dda24e7195934 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 8 Nov 2020 12:13:15 +0000 Subject: [PATCH] Enable osmdbt based replication --- cookbooks/planet/recipes/replication.rb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/cookbooks/planet/recipes/replication.rb b/cookbooks/planet/recipes/replication.rb index 85a3c08d3..51f0e69a2 100644 --- a/cookbooks/planet/recipes/replication.rb +++ b/cookbooks/planet/recipes/replication.rb @@ -216,6 +216,12 @@ systemd_service "replication-minutely" do no_new_privileges true end +systemd_timer "replication-minutely" do + description "Minutely replication" + on_boot_sec 60 + on_unit_active_sec 60 +end + template "/etc/replication/changesets.conf" do source "changesets.conf.erb" user "root" @@ -303,10 +309,8 @@ if node[:planet][:replication] == "enabled" mailto "zerebubuth@gmail.com" end - systemd_timer "replication-minutely" do - description "Minutely replication" - on_boot_sec 60 - on_unit_active_sec 60 + service "replication-minutely.timer" do + action [:enable, :start] end cron_d "replication-minutely" do @@ -344,6 +348,10 @@ else action :delete end + service "replication-minutely.timer" do + action [:stop, :disable] + end + cron_d "replication-minutely" do action :delete end -- 2.39.5