git-subtree-dir: estore git-subtree-mainline: 746868d720b9be1003a2f783b7a12d526d8eea60 git-subtree-split: e34dfc397c94025670baa2b73b482c01f3033a6a
21 lines
607 B
Bash
Executable File
21 lines
607 B
Bash
Executable File
#!/bin/bash
|
|
# Downloads and reprocesses Connecticut OSM data, then restarts OSRM.
|
|
# Run quarterly or whenever needed.
|
|
# Crontab: 0 3 1 1,4,7,10 * /path/to/docker/osrm/update.sh >> /var/log/osrm-update.log 2>&1
|
|
|
|
set -e
|
|
cd "$(dirname "$0")"
|
|
mkdir -p data
|
|
|
|
echo "[$(date)] Downloading Connecticut OSM data..."
|
|
curl -L -o data/connecticut-latest.osm.pbf \
|
|
https://download.geofabrik.de/north-america/us/connecticut-latest.osm.pbf
|
|
|
|
echo "[$(date)] Processing..."
|
|
docker compose --profile init up --force-recreate osrm-init
|
|
|
|
echo "[$(date)] Restarting OSRM..."
|
|
docker compose up -d osrm
|
|
|
|
echo "[$(date)] Done."
|