]> git.openstreetmap.org Git - chef.git/commitdiff
Remove code to add no longer used --readonly flag
authorTom Hughes <tom@compton.nu>
Sun, 23 Aug 2020 10:04:50 +0000 (11:04 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 23 Aug 2020 10:06:09 +0000 (11:06 +0100)
Closes #335

cookbooks/web/recipes/cgimap.rb

index ba9799c4c7685e91c6d253fd5da73f992d0c0409..8a6b23b2878390818d7555248afe40d29c433bc8 100644 (file)
@@ -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