mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-20 06:56:18 -05:00
Exiting if there is no success.
This commit is contained in:
parent
b7ae6aced0
commit
8fb7bf391b
1 changed files with 7 additions and 0 deletions
|
|
@ -53,6 +53,7 @@ wget --continue https://download.geofabrik.de/north-america/us/district-of-colum
|
|||
set +x
|
||||
MAX_TRIES=3
|
||||
COUNT=0
|
||||
SUCCESS=false
|
||||
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=$?
|
||||
|
|
@ -61,11 +62,17 @@ while [ "${COUNT}" -lt "${MAX_TRIES}" ]; do
|
|||
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
|
||||
SUCCESS=true
|
||||
break
|
||||
fi
|
||||
((COUNT = COUNT + 1))
|
||||
done
|
||||
|
||||
if [[ "${SUCCESS}" == false ]]; then
|
||||
echo "Could not import map data"
|
||||
exit 6
|
||||
fi
|
||||
|
||||
cat >/usr/local/etc/renderd.conf <<'EOF'
|
||||
[renderd]
|
||||
num_threads=4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue