-## Hourly replication
-
-directory "/store/planet/replication/hour" do
- owner "planet"
- group "planet"
- mode "755"
-end
-
-directory "/var/lib/replication/hour" do
- owner "planet"
- group "planet"
- mode "755"
-end
-
-link "/var/lib/replication/hour/data" do
- to "/store/planet/replication/hour"
-end
-
-template "/var/lib/replication/hour/configuration.txt" do
- source "replication.config.erb"
- owner "planet"
- group "planet"
- mode "644"
- variables :base => "minute", :interval => 3600
-end
-
-## Daily replication
-
-directory "/store/planet/replication/day" do
- owner "planet"
- group "planet"
- mode "755"
-end
-
-directory "/var/lib/replication/day" do
- owner "planet"
- group "planet"
- mode "755"
-end
-
-link "/var/lib/replication/day/data" do
- to "/store/planet/replication/day"
+systemd_service "replication-changesets" do
+ description "Changesets replication"
+ user "planet"
+ exec_start "/usr/local/bin/replicate-changesets /etc/replication/changesets.conf"
+ private_tmp true
+ private_devices true
+ protect_system "full"
+ protect_home true
+ restrict_address_families %w[AF_INET AF_INET6]
+ no_new_privileges true