X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/fbdd990ff399d26a11e0dce096e15ef2d8cde521..2f3f96a68c3011ac185ca4f30040a173cc4e870a:/cookbooks/nominatim/recipes/base.rb diff --git a/cookbooks/nominatim/recipes/base.rb b/cookbooks/nominatim/recipes/base.rb index 390de61f9..31bc30b27 100644 --- a/cookbooks/nominatim/recipes/base.rb +++ b/cookbooks/nominatim/recipes/base.rb @@ -26,6 +26,7 @@ package "php5-pgsql" package "php5-fpm" package "php-pear" package "php-apc" +package "php-db" apache_module "rewrite" apache_module "proxy" @@ -70,6 +71,12 @@ directory "/var/log/nominatim" do mode 0755 end +directory "#{home_directory}/status" do + owner "nominatim" + group "postgres" + mode 0775 +end + template "/etc/logrotate.d/nominatim" do source "logrotate.nominatim.erb" owner "root" @@ -100,11 +107,6 @@ package "libboost-system-dev" package "libboost-filesystem-dev" package "libboost-thread-dev" -execute "php-pear-db" do - command "pear install DB" - not_if { File.exist?("/usr/share/php/DB") } -end - execute "compile_nominatim" do action :nothing command "cd #{source_directory} && ./autogen.sh && ./configure && make" @@ -221,7 +223,7 @@ external_data.each do |fname| end end -additional_scripts = %w(backup-nominatim clean-db-nominatim) +additional_scripts = %w(backup-nominatim vacuum-db-nominatim) additional_scripts.each do |fname| template "/usr/local/bin/#{fname}" do @@ -239,13 +241,6 @@ directory File.dirname(node[:nominatim][:flatnode_file]) do recursive true end -directory "/data/postgresql-archive" do - owner "postgres" - group "postgres" - mode 0700 - only_if { node[:postgresql][:settings][:defaults][:archive_mode] == "on" } -end - apache_site "nominatim.openstreetmap.org" do template "apache.erb" directory source_directory