From: Tom Hughes Date: Wed, 22 Mar 2023 22:34:48 +0000 (+0000) Subject: Get geoipdate working on debian X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/8c0b9f0dbbe0a852c6ae810830041c7221ec05e8 Get geoipdate working on debian --- diff --git a/cookbooks/geoipupdate/attributes/default.rb b/cookbooks/geoipupdate/attributes/default.rb index 878d4fbb5..a4b753583 100644 --- a/cookbooks/geoipupdate/attributes/default.rb +++ b/cookbooks/geoipupdate/attributes/default.rb @@ -1,3 +1,7 @@ default[:geoipupdate][:account] = "149244" default[:geoipupdate][:editions] = %w[GeoLite2-ASN GeoLite2-City GeoLite2-Country] -default[:geoipupdate][:directory] = "/usr/share/GeoIP" +default[:geoipupdate][:directory] = if platform?("debian") + "/var/lib/GeoIP" + else + "/usr/share/GeoIP" + end diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index 27cb3b02f..e92c03bd4 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -341,7 +341,7 @@ action :create do "support_email" => "support@openstreetmap.org", "email_return_path" => "bounces@openstreetmap.org", "geonames_username" => "openstreetmap", - "maxmind_database" => "/usr/share/GeoIP/GeoLite2-Country.mmdb", + "maxmind_database" => "#{node[:geoipupdate][:directory]}/GeoLite2-Country.mmdb", "max_request_area" => node[:web][:max_request_area], "max_number_of_nodes" => node[:web][:max_number_of_nodes], "max_number_of_way_nodes" => node[:web][:max_number_of_way_nodes],