From 24ffc641910abab54626ca3768369b398e11f7ca Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 20 Oct 2016 21:56:43 +0100 Subject: [PATCH] Configure GeoIP database for web site --- cookbooks/web/definitions/rails_port.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cookbooks/web/definitions/rails_port.rb b/cookbooks/web/definitions/rails_port.rb index 51a56e9e7..6773cf974 100644 --- a/cookbooks/web/definitions/rails_port.rb +++ b/cookbooks/web/definitions/rails_port.rb @@ -44,6 +44,7 @@ define :rails_port, :action => [:create, :enable] do package "irb#{ruby_version}" if ruby_version.to_f < 1.9 package "imagemagick" package "nodejs" + package "geoip-database" package "g++" package "pkg-config" @@ -122,6 +123,8 @@ define :rails_port, :action => [:create, :enable] do line.gsub!(/^( *)#geonames_username:.*$/, "\\1geonames_username: \"openstreetmap\"") + line.gsub!(/^( *)#geoip_database:.*$/, "\\1geoip_database: \"/usr/share/GeoIP/GeoIPv6.dat\"") + if params[:gpx_dir] line.gsub!(/^( *)gpx_trace_dir:.*$/, "\\1gpx_trace_dir: \"#{params[:gpx_dir]}/traces\"") line.gsub!(/^( *)gpx_image_dir:.*$/, "\\1gpx_image_dir: \"#{params[:gpx_dir]}/images\"") -- 2.39.5