files_mode "755"
end
+template "/usr/local/bin/replicate-minute" do
+ source "replicate-minute.erb"
+ owner "root"
+ group "root"
+ mode "755"
+end
+
template "/usr/local/bin/users-agreed" do
source "users-agreed.erb"
owner "root"
content YAML.dump(osmdbt_config)
end
+systemd_service "replication-minutely" do
+ description "Minutely replication"
+ user "planet"
+ working_directory "/etc/replication"
+ exec_start "/usr/local/bin/replicate-minute"
+ private_tmp true
+ private_devices true
+ protect_system "full"
+ protect_home true
+ restrict_address_families %w[AF_INET AF_INET6]
+ no_new_privileges true
+end
+
template "/etc/replication/changesets.conf" do
source "changesets.conf.erb"
user "root"
mailto "zerebubuth@gmail.com"
end
+ systemd_timer "replication-minutely" do
+ description "Minutely replication"
+ on_boot_sec 60
+ on_unit_active_sec 60
+ end
+
cron_d "replication-minutely" do
user "planet"
command "/usr/local/bin/osmosis -q --replicate-apidb authFile=/etc/replication/auth.conf validateSchemaVersion=false --write-replication workingDirectory=/store/planet/replication/minute"