create archive directory on nominatim master
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 14 Jun 2015 21:32:24 +0000 (23:32 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 14 Jun 2015 21:33:04 +0000 (23:33 +0200)
cookbooks/nominatim/recipes/default.rb
cookbooks/nominatim/templates/default/clean-db-nominatim.erb

index b8bfca2a168ff0e4e925edf2c83af8044fc8ee21..c65c208aab66e55d9ea7d7cca1b3ea0bc6267e08 100644 (file)
@@ -277,3 +277,11 @@ directory File.dirname(node[:nominatim][:flatnode_file]) do
   mode 0755
   recursive true
 end
+
+if node[:postgresql][:settings][:defaults][:archive_mode] == "on"
+  directory "/data/postgresql-archive" do
+    owner "postgres"
+    group "postgres"
+    mode 0700
+  end
+end
index 962ebab94ba87ef7b8ed25c379fc883ca64128dd..4a40e22d4568ddb63c67ff9b374cd29006d9d157 100644 (file)
@@ -12,7 +12,7 @@ for i in `seq 0 246`; do
   psql -q -d nominatim -c "VACUUM ANALYSE search_name_${i}"
 done
 
-<% if node[:postgresql][:settings][:archive_mode] == "on" -%>
+<% if node[:postgresql][:settings][:defaults][:archive_mode] == "on" -%>
 
 # Cleanup archive directory
 find -L /data/postgresql-archive -mtime +3 -print0 | xargs -0r rm