-## 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"
+ sandbox :enable_network => true
+ read_write_paths [
+ "/run/replication",
+ "/store/planet/replication/changesets"
+ ]