X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/df6101ff2a7258dbb8d5995144026fd5d3b9b711..55f07b266707be40843e951f5811e0de82b50fb5:/cookbooks/nominatim/recipes/default.rb diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index 0a0640fd8..af96a9c77 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -61,13 +61,17 @@ apache_site "nominatim.openstreetmap.org" do variables :pools => node[:nominatim][:fpm_pools] end +apache_site "default" do + action [ :disable ] +end + node[:nominatim][:fpm_pools].each do |name,data| template "/etc/php5/fpm/pool.d/#{name}.conf" do source "fpm.conf.erb" owner "root" group "root" mode 0644 - variables data.merge(:name => name) + variables data.merge(:name => name, :port => data[:port]) notifies :reload, "service[php5-fpm]" end end @@ -198,7 +202,14 @@ file "#{source_directory}/settings/ip_blocks.map" do mode 0664 end +if node[:nominatim][:enabled] + cron_action = :create +else + cron_action = :delete +end + cron "nominatim_logrotate" do + action cron_action hour "5" minute "30" weekday "0" @@ -208,12 +219,14 @@ cron "nominatim_logrotate" do end cron "nominatim_banip" do + action cron_action command "#{source_directory}/utils/cron_banip.py" user "nominatim" mailto email_errors end cron "nominatim_vacuum" do + action cron_action hour "2" minute "00" command "#{source_directory}/utils/cron_vacuum.sh" @@ -221,16 +234,6 @@ cron "nominatim_vacuum" do mailto email_errors end -['search', 'reverse'].each do |filename| - ['phpj', 'phpx'].each do |ext| - link "#{source_directory}/website/#{filename}.#{ext}" do - to "#{source_directory}/website/#{filename}.php" - user "nominatim" - group "nominatim" - end - end -end - template "#{source_directory}/utils/nominatim-update" do source "updater.erb" user "nominatim" @@ -274,6 +277,7 @@ template "/usr/local/bin/backup-nominatim" do end cron "nominatim_backup" do + action cron_action hour "3" minute "00" day "1"