]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/geoipupdate/recipes/default.rb
Make the GeoIP database directory vary with the OS version
[chef.git] / cookbooks / geoipupdate / recipes / default.rb
index 6d8e5b6e56018734803cd48e46460330c07952c7..036c27881c06262bbfd00589a284dada2b992bdc 100644 (file)
@@ -35,7 +35,7 @@ execute "geoipupdate" do
   command "geoipupdate"
   user "root"
   group "root"
-  not_if { kitchen? || node[:geoipupdate][:editions].all? { |edition| ::File.exist?("/usr/share/GeoIP/#{edition}.mmdb") } }
+  not_if { kitchen? || node[:geoipupdate][:editions].all? { |edition| ::File.exist?("#{node[:geoipupdate][:directory]}/#{edition}.mmdb") } }
 end
 
 systemd_service "geoipupdate" do
@@ -46,7 +46,7 @@ systemd_service "geoipupdate" do
   private_devices true
   protect_system "strict"
   protect_home true
-  read_write_paths "/usr/share/GeoIP"
+  read_write_paths node[:geoipupdate][:directory]
 end
 
 systemd_timer "geoipupdate" do