]> git.openstreetmap.org Git - chef.git/commitdiff
nominatim: use correct branch in update script
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 18 Sep 2016 14:19:55 +0000 (16:19 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 18 Sep 2016 14:20:42 +0000 (16:20 +0200)
cookbooks/nominatim/recipes/base.rb
cookbooks/nominatim/recipes/default.rb
cookbooks/nominatim/templates/default/updater.erb

index 97cf576c6f4050e3070b5c6b5b9948eb22603441..f1d42092887de9cc54fd7d03cf0092e1a3ecc346 100644 (file)
@@ -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
index 055b87072c771c758bbb1caf290e83a3646502c7..f09918e85cf483bfef9b6ff316d7f4f32929b978 100644 (file)
@@ -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
index d8c9666ced65778455c0f0605fe96bc956f47e1f..d839e6bb49aae685349dee18c40cc0b2d71c9d1c 100644 (file)
@@ -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