]> git.openstreetmap.org Git - chef.git/blob - cookbooks/tile/templates/default/expire-tiles-custom.erb
Install g++ for knife
[chef.git] / cookbooks / tile / templates / default / expire-tiles-custom.erb
1 #!/usr/bin/ruby
2
3 # DO NOT EDIT - This file is being maintained by Chef
4
5 args = [
6 <% node[:tile][:styles].each do |name,details| -%>
7   "-t", "/srv/tile.openstreetmap.org/tiles/<%= name %>",
8 <% end -%>
9   "--min", "13",
10   "--max", "<%= node[:tile][:styles].collect { |n,d| d[:max_zoom] }.max %>"
11 ]
12
13 Dir.glob("/var/lib/replicate/expire-queue/changes-*.gz").sort.each do |f|
14    system("/usr/local/bin/expire-tiles-single", *args, f) && File::unlink(f)
15 end