3 # DO NOT EDIT - This file is being maintained by Chef
5 # Change to Nominatim directory
6 DIR="$( cd "$( dirname "$0" )" && pwd )"
11 # Send output to the log (logrotatable)
12 exec >> /var/log/nominatim/update.log 2>&1
15 ./utils/update.php --no-npi --import-osmosis
17 if git fetch origin; then
18 # will trigger recompilation if necessary
19 git merge origin/master
21 echo "WARNING: git fetch failed."
24 # sleep a bit if updates take less than a minute
26 elapsed=$((endtime - starttime))
27 if [[ $elapsed -lt 60 ]]
29 sleepy=$((60 - $elapsed))
30 echo "Sleeping for ${sleepy}s..."