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]
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]}\"")
execute rails_directory do
action :nothing
- command "passenger-config restart-app #{rails_directory}"
+ command "passenger-config restart-app --ignore-app-not-running #{rails_directory}"
user "root"
group "root"
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"