database database_name
end
-directory "/var/log/nominatim" do
+directory node[:nominatim][:logdir] do
owner "nominatim"
group "nominatim"
mode 0755
+ recursive true
+end
+
+file "#{node[:nominatim][:logdir]}/query.log" do
+ action :create_if_missing
+ owner "www-data"
+ group "adm"
+ mode 0664
+end
+
+file "#{node[:nominatim][:logdir]}/update.log" do
+ action :create_if_missing
+ owner "nominatim"
+ group "adm"
+ mode 0664
end
directory "#{home_directory}/status" do
mode 0644
end
+template "/etc/logrotate.d/apache2" do
+ source "logrotate.apache.erb"
+ owner "root"
+ group "root"
+ mode 0644
+end
+
package "osmosis"
package "gcc"
package "proj-bin"
package "postgresql-server-dev-#{database_version}"
package "build-essential"
package "libxml2-dev"
+package "libexpat-dev"
package "libgeos-dev"
package "libgeos++-dev"
package "libpq-dev"
user "nominatim"
end
-directory "#{source_directory}/log" do
- owner "nominatim"
- group "nominatim"
- mode 0755
-end
-
template "#{source_directory}/.git/hooks/post-merge" do
source "update_source.erb"
owner "nominatim"
mode 0664
end
-if node[:nominatim][:enabled]
- cron_action = :create
-else
- cron_action = :delete
-end
+cron_action = if node[:nominatim][:enabled]
+ :create
+ else
+ :delete
+ end
template "/etc/cron.d/nominatim" do
action cron_action