]> git.openstreetmap.org Git - chef.git/commitdiff
Get geoipdate working on debian
authorTom Hughes <tom@compton.nu>
Wed, 22 Mar 2023 22:34:48 +0000 (22:34 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 22 Mar 2023 23:58:43 +0000 (23:58 +0000)
cookbooks/geoipupdate/attributes/default.rb
cookbooks/web/resources/rails_port.rb

index 878d4fbb5ecfe3466eac914f55fd1bb2b2f9b83b..a4b75358311798c949d9fb5fab2747167e01e3b0 100644 (file)
@@ -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
index 27cb3b02f9b09ca9c5dad6a13cbf99f5bda0b699..e92c03bd4bf298cccbb1173716989c51a9f8a2a5 100644 (file)
@@ -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],