X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/211ad09a3962946435369bc15a471320e3b13e70..34bbecfc71d6c086ce902ddb3fce4bdc0ab331f2:/cookbooks/nominatim/recipes/default.rb diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index 2e5887b5a..63734cdb8 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -20,6 +20,13 @@ basedir = data_bag_item("accounts", "nominatim")["home"] email_errors = data_bag_item("accounts", "lonvia")["email"] +directory basedir do + owner "nominatim" + group "nominatim" + mode 0o755 + recursive true +end + directory node[:nominatim][:logdir] do owner "nominatim" group "nominatim" @@ -41,12 +48,6 @@ file "#{node[:nominatim][:logdir]}/update.log" do mode 0o664 end -directory "#{basedir}/status" do - owner "nominatim" - group "postgres" - mode 0o775 -end - ## Postgresql include_recipe "postgresql" @@ -244,6 +245,7 @@ template "#{source_directory}/utils/nominatim-update" do group "nominatim" mode 0o755 variables :bindir => build_directory, + :srcdir => source_directory, :logfile => "#{node[:nominatim][:logdir]}/update.log", :branch => node[:nominatim][:revision], :update_stop_file => "#{basedir}/status/updates_disabled" @@ -349,7 +351,7 @@ end include_recipe "fail2ban" fail2ban_filter "nominatim" do - failregex '^ - - \[[^]]+\] "[^"]+" 429 ' + failregex '^ - - \[\] "[^"]+" 429 ' end fail2ban_jail "nominatim" do @@ -380,3 +382,9 @@ end munin_plugin "nominatim_throttled_ips" do target "#{source_directory}/munin/nominatim_throttled_ips" end + +directory "#{basedir}/status" do + owner "nominatim" + group "postgres" + mode 0o775 +end