From ab589c032804640ed50c5017e99c1f0d02b2dffb Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 23 Aug 2020 11:04:50 +0100 Subject: [PATCH] Remove code to add no longer used --readonly flag Closes #335 --- cookbooks/web/recipes/cgimap.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/cookbooks/web/recipes/cgimap.rb b/cookbooks/web/recipes/cgimap.rb index ba9799c4c..8a6b23b28 100644 --- a/cookbooks/web/recipes/cgimap.rb +++ b/cookbooks/web/recipes/cgimap.rb @@ -27,18 +27,14 @@ package "openstreetmap-cgimap-bin" do action :upgrade end -if node[:web][:readonly_database_host] - database_host = node[:web][:readonly_database_host] - database_readonly = true -else - database_host = node[:web][:database_host] - database_readonly = node[:web][:status] == "database_readonly" -end +database_host = if node[:web][:readonly_database_host] + node[:web][:readonly_database_host] + else + node[:web][:database_host] + end memcached_servers = node[:web][:memcached_servers] || [] -switches = database_readonly ? " --readonly" : "" - systemd_service "cgimap" do description "OpenStreetMap API Server" type "forking" @@ -54,7 +50,7 @@ systemd_service "cgimap" do "CGIMAP_RATELIMIT" => "204800", "CGIMAP_MAXDEBT" => "250" user "rails" - exec_start "/usr/bin/openstreetmap-cgimap --daemon --port 8000 --instances 30#{switches}" + exec_start "/usr/bin/openstreetmap-cgimap --daemon --port 8000 --instances 30" exec_reload "/bin/kill -HUP $MAINPID" private_tmp true private_devices true -- 2.39.5