Skip to content

Commit

Permalink
Don't configure an update host for cgimap in readonly mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Dec 15, 2024
1 parent 17a8df1 commit 434159a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cookbooks/web/recipes/cgimap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"CGIMAP_DBNAME" => "openstreetmap",
"CGIMAP_USERNAME" => "cgimap",
"CGIMAP_PASSWORD" => db_passwords["cgimap"],
"CGIMAP_UPDATE_HOST" => node[:web][:database_host],
"CGIMAP_PIDFILE" => "#{node[:web][:pid_directory]}/cgimap.pid",
"CGIMAP_LOGFILE" => "#{node[:web][:log_directory]}/cgimap.log",
"CGIMAP_MEMCACHE" => memcached_servers.join(","),
Expand All @@ -59,6 +58,8 @@

if %w[database_readonly api_readonly].include?(node[:web][:status])
cgimap_options["CGIMAP_DISABLE_API_WRITE"] = "true"
else
cgimap_options["CGIMAP_UPDATE_HOST"] = node[:web][:database_host]
end

systemd_service "cgimap" do
Expand Down

0 comments on commit 434159a

Please sign in to comment.