mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 07:56:18 -05:00
Trying map imports multiple times because they don't seem to work in any order.
This commit is contained in:
parent
f08292de56
commit
b7ae6aced0
1 changed files with 16 additions and 4 deletions
|
|
@ -49,10 +49,22 @@ fi
|
|||
# Use D.C. to initialized DB because it is so small.
|
||||
wget --continue https://download.geofabrik.de/north-america/us/district-of-columbia-latest.osm.pbf \
|
||||
-O /tmp/district-of-columbia-latest.osm.pbf
|
||||
sudo -u wrolpi /bin/bash /opt/wrolpi/scripts/import_map.sh /tmp/district-of-columbia-latest.osm.pbf
|
||||
# Initialize indexes and global polygons.
|
||||
sudo -u wrolpi psql -d gis -f /opt/openstreetmap-carto/indexes.sql
|
||||
sudo -u wrolpi /opt/openstreetmap-carto/scripts/get-external-data.py -d gis -U wrolpi
|
||||
# Initialize indexes and global polygons. This may take multiple tries.
|
||||
set +x
|
||||
MAX_TRIES=3
|
||||
COUNT=0
|
||||
while [ "${COUNT}" -lt "${MAX_TRIES}" ]; do
|
||||
sudo -u wrolpi /bin/bash /opt/wrolpi/scripts/import_map.sh /tmp/district-of-columbia-latest.osm.pbf
|
||||
dc_import=$?
|
||||
sudo -u wrolpi psql -d gis -f /opt/openstreetmap-carto/indexes.sql
|
||||
indexes=$?
|
||||
sudo -u wrolpi /opt/openstreetmap-carto/scripts/get-external-data.py -d gis -U wrolpi
|
||||
external_data=$?
|
||||
if [[ "${dc_import}" == 0 && "${indexes}" == 0 && "${external_data}" == 0 ]]; then
|
||||
break
|
||||
fi
|
||||
((COUNT = COUNT + 1))
|
||||
done
|
||||
|
||||
cat >/usr/local/etc/renderd.conf <<'EOF'
|
||||
[renderd]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue