Skip to content

Instantly share code, notes, and snippets.

@lonvia
Created May 22, 2014 16:52
Show Gist options
  • Save lonvia/d31b6fd751a2f094cb31 to your computer and use it in GitHub Desktop.
Save lonvia/d31b6fd751a2f094cb31 to your computer and use it in GitHub Desktop.
Photon continuous updates
#!/bin/bash -e
while true
do
starttime=`date +%s`
cd $NOMINATIM_DIR
./utils/update.php --no-npi --import-osmosis --no-index
==> ADD LINE TO CALL PHOTON UPDATER HERE
# sleep a bit if updates take less than a minute
endtime=`date +%s`
elapsed=$((endtime - starttime))
if [[ $elapsed -lt 60 ]]
then
sleepy=$((60 - $elapsed))
echo "Sleeping for ${sleepy}s..."
sleep $sleepy
fi
done
@christophlingg
Copy link

great, I'll adopt it to photon's readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment