X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/a3dd46068ed96afda371cdbe2ceeec7609a5083c..f31ba7e2c98ff3c1ccab81c17bfec79cd7a9065a:/cookbooks/web/definitions/rails_port.rb diff --git a/cookbooks/web/definitions/rails_port.rb b/cookbooks/web/definitions/rails_port.rb index 83d0a1a36..79a9cc836 100644 --- a/cookbooks/web/definitions/rails_port.rb +++ b/cookbooks/web/definitions/rails_port.rb @@ -145,7 +145,7 @@ define :rails_port, :action => [:create, :enable] do end if params[:memcache_servers] - line.gsub!(/^( *)#memcache_servers:.*$/, "\\1memcache_servers: [ \"#{params[:memcache_servers].join("\", \"")}\" ]") + line.gsub!(/^( *)#memcache_servers:.*$/, "\\1memcache_servers: [ \"#{params[:memcache_servers].join('", "')}\" ]") end if params[:potlatch2_key] @@ -164,6 +164,10 @@ define :rails_port, :action => [:create, :enable] do line.gsub!(/^( *)nominatim_url:.*$/, "\\1nominatim_url: \"#{params[:nominatim_url]}\"") end + if params[:osrm_url] + line.gsub!(/^( *)osrm_url:.*$/, "\\1osrm_url: \"#{params[:osrm_url]}\"") + end + if params[:google_auth_id] line.gsub!(/^( *)#google_auth_id:.*$/, "\\1google_auth_id: \"#{params[:google_auth_id]}\"") line.gsub!(/^( *)#google_auth_secret:.*$/, "\\1google_auth_secret: \"#{params[:google_auth_secret]}\"") @@ -283,7 +287,7 @@ define :rails_port, :action => [:create, :enable] do only_if { File.exist?("/usr/bin/passenger-config") } end - template "/etc/cron.daily/rails-#{name}" do + template "/etc/cron.daily/rails-#{name.tr('.', '-')}" do cookbook "web" source "rails.cron.erb" owner "root"