3 # DO NOT EDIT - This file is being maintained by Chef
 
   5 # Change to Nominatim directory
 
   8 while [ ! -f "<%= @update_stop_file %>" ]
 
  10     # Send output to the log (logrotatable)
 
  11     exec >> <%= @logfile %> 2>&1
 
  14     ./utils/update.php --no-npi --import-osmosis
 
  17     if git fetch origin; then
 
  18       # will trigger recompilation if necessary
 
  19       git merge origin/<%= @branch %>
 
  21       echo "WARNING: git fetch failed."
 
  25     # sleep a bit if updates take less than a minute
 
  27     elapsed=$((endtime - starttime))
 
  28     if [[ $elapsed -lt 60 ]]
 
  30         sleepy=$((60 - $elapsed))
 
  31         echo "Sleeping for ${sleepy}s..."