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
16 if git fetch origin; then
17 # will trigger recompilation if necessary
18 git merge origin/<%= @branch %>
20 echo "WARNING: git fetch failed."
23 # sleep a bit if updates take less than a minute
25 elapsed=$((endtime - starttime))
26 if [[ $elapsed -lt 60 ]]
28 sleepy=$((60 - $elapsed))
29 echo "Sleeping for ${sleepy}s..."