#!/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."