]> git.openstreetmap.org Git - chef.git/commitdiff
Don't run cgimap in readonly mode when the database is writable
authorTom Hughes <tom@compton.nu>
Sat, 25 May 2019 10:23:06 +0000 (11:23 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 25 May 2019 10:32:10 +0000 (11:32 +0100)
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"