From c61bfd4788208f32a536d04c9e6b7c406d222f9f Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 15 Dec 2014 21:57:19 +0100 Subject: [PATCH] nominatim: add postgres/postgis version information in local settings --- cookbooks/nominatim/recipes/default.rb | 1 + cookbooks/nominatim/templates/default/nominatim.erb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index d41e322a3..65da50c54 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -178,6 +178,7 @@ template "#{source_directory}/settings/local.php" do owner "nominatim" group "nominatim" mode 0664 + variables :postgres_version => database_version end template "#{source_directory}/settings/ip_blocks.conf" do diff --git a/cookbooks/nominatim/templates/default/nominatim.erb b/cookbooks/nominatim/templates/default/nominatim.erb index d36523d85..d05c8f558 100644 --- a/cookbooks/nominatim/templates/default/nominatim.erb +++ b/cookbooks/nominatim/templates/default/nominatim.erb @@ -7,3 +7,5 @@ if (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS'])) else @define('CONST_Website_BaseURL', 'http://nominatim.openstreetmap.org/'); +@define('CONST_Postgresql_Version', '<%= @postgres_version %>'); +@define('CONST_Postgis_Version', '<%= node[:nominatim][:database][:postgis] %>'); -- 2.39.5