X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/9302cec0aab75609f536109ac0c10f3a44a204ef..ff593b74e8a02eb714124ecabdf9451febc6ba32:/cookbooks/tile/recipes/default.rb diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index 0c9da1339..eab19d75d 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -514,12 +514,19 @@ package %w[ pyosmium ] -directory "/var/lib/replicate" do +directory node[:tile][:replication][:directory] do owner "tile" group "tile" mode "755" end +link "/var/lib/replicate" do + to node[:tile][:replication][:directory] + owner "tile" + group "tile" + not_if { node[:tile][:replication][:directory] == "/var/lib/replicate" } +end + template "/usr/local/bin/expire-tiles" do source "expire-tiles.erb" owner "root" @@ -570,17 +577,6 @@ template "/usr/local/bin/replicate-post" do mode "755" end -osm2pgsql_arguments = %w[ - --number-processes=1 - --log-progress=false - --expire-tiles=13-19 - --expire-output=/var/lib/replicate/dirty-tiles.txt - ] - -osm2pgsql_arguments.append("--multi-geometry") if node[:tile][:database][:multi_geometry] -osm2pgsql_arguments.append("--hstore") if node[:tile][:database][:hstore] -osm2pgsql_arguments.append("--tag-transform-script=#{node[:tile][:database][:tag_transform_script]}") if node[:tile][:database][:tag_transform_script] - systemd_service "replicate" do description "Rendering database replication service" after "postgresql.service"