From fa9d2a88e9f89d755f1a637b88d189e8900e38ef Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 18 Sep 2016 16:19:55 +0200 Subject: [PATCH] nominatim: use correct branch in update script --- cookbooks/nominatim/recipes/base.rb | 3 +++ cookbooks/nominatim/recipes/default.rb | 3 +++ cookbooks/nominatim/templates/default/updater.erb | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cookbooks/nominatim/recipes/base.rb b/cookbooks/nominatim/recipes/base.rb index 97cf576c6..f1d420928 100644 --- a/cookbooks/nominatim/recipes/base.rb +++ b/cookbooks/nominatim/recipes/base.rb @@ -195,6 +195,9 @@ template "#{source_directory}/utils/nominatim-update" do user "nominatim" group "nominatim" mode 0o755 + variables :logfile => "#{node[:nominatim][:logdir]}/update.log", + :branch => node[:nominatim][:revision], + :update_stop_file => "#{basedir}/status/updates_disabled" end template "/etc/init.d/nominatim-update" do diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index 055b87072..f09918e85 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -242,6 +242,9 @@ template "#{source_directory}/utils/nominatim-update" do user "nominatim" group "nominatim" mode 0o755 + variables :logfile => "#{node[:nominatim][:logdir]}/update.log", + :branch => node[:nominatim][:revision], + :update_stop_file => "#{basedir}/status/updates_disabled" end template "/etc/init.d/nominatim-update" do diff --git a/cookbooks/nominatim/templates/default/updater.erb b/cookbooks/nominatim/templates/default/updater.erb index d8c9666ce..d839e6bb4 100644 --- a/cookbooks/nominatim/templates/default/updater.erb +++ b/cookbooks/nominatim/templates/default/updater.erb @@ -9,14 +9,14 @@ cd $DIR/.. while [ ! -f "<%= @update_stop_file %>" ] do # Send output to the log (logrotatable) - exec >> <%= node[:nominatim][:logdir] %>/update.log 2>&1 + exec >> <%= @logfile %>/update.log 2>&1 starttime=`date +%s` ./utils/update.php --no-npi --import-osmosis if git fetch origin; then # will trigger recompilation if necessary - git merge origin/master + git merge origin/<%= @branch %> else echo "WARNING: git fetch failed." fi -- 2.39.5