+ template "/usr/local/bin/update-lowzoom-#{name}" do
+ source "update-lowzoom.erb"
+ owner "root"
+ group "root"
+ mode 0o755
+ variables :style => name
+ end
+
+ template "/etc/init.d/update-lowzoom-#{name}" do
+ source "update-lowzoom.init.erb"
+ owner "root"
+ group "root"
+ mode 0o755
+ variables :style => name
+ end
+
+ service "update-lowzoom-#{name}" do
+ action :disable
+ supports :restart => true
+ end
+
+ directory tile_directory do
+ owner "tile"
+ group "tile"
+ mode 0o755
+ end
+
+ details[:tile_directories].each do |directory|
+ directory directory[:name] do
+ owner "www-data"
+ group "www-data"
+ mode 0o755
+ end
+
+ directory[:min_zoom].upto(directory[:max_zoom]) do |zoom|
+ directory "#{directory[:name]}/#{zoom}" do
+ owner "www-data"
+ group "www-data"
+ mode 0o755
+ end
+
+ link "#{tile_directory}/#{zoom}" do
+ to "#{directory[:name]}/#{zoom}"
+ owner "tile"
+ group "tile"
+ end
+ end
+ end
+