]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/recipes/cgimap.rb
Don't run cgimap in readonly mode when the database is writable
[chef.git] / cookbooks / web / recipes / cgimap.rb
index 4c5a0cd8de188b33c4375001455a9815ce32393b..61d1162b1cab711bade231cd874a0b0198eb2bd1 100644 (file)
@@ -28,7 +28,7 @@ end
 
 if node[:web][:readonly_database_host]
   database_host = node[:web][:readonly_database_host]
-  database_readonly = true
+  database_readonly = node[:web][:readonly_database_host] != node[:web][:database_host]
 else
   database_host = node[:web][:database_host]
   database_readonly = node[:web][:status] == "database_readonly"