]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/recipes/base.rb
disable db replication between pummelzacken and poldi
[chef.git] / cookbooks / nominatim / recipes / base.rb
index 8721ef0146e987bf4018cad29cd7b2d10575551f..da10a90010a2db3631543963c8a76d5cadb5e726 100644 (file)
@@ -65,10 +65,25 @@ postgresql_munin "nominatim" do
   database database_name
 end
 
   database database_name
 end
 
-directory "/var/log/nominatim" do
+directory node[:nominatim][:logdir] do
   owner "nominatim"
   group "nominatim"
   mode 0755
   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
 end
 
 directory "#{home_directory}/status" do
@@ -84,6 +99,13 @@ template "/etc/logrotate.d/nominatim" do
   mode 0644
 end
 
   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 "osmosis"
 package "gcc"
 package "proj-bin"
@@ -114,12 +136,6 @@ execute "compile_nominatim" do
   user "nominatim"
 end
 
   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"
 template "#{source_directory}/.git/hooks/post-merge" do
   source "update_source.erb"
   owner "nominatim"