Created
May 22, 2014 16:52
-
-
Save lonvia/d31b6fd751a2f094cb31 to your computer and use it in GitHub Desktop.
Photon continuous updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
great, I'll adopt it to photon's readme