Map initialization script will only ask to reset if the map database exists.

This commit is contained in:
Roland 2023-10-09 12:20:51 -06:00
parent cc6d20dac6
commit 8230174fcd
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 4 additions and 2 deletions

View file

@ -104,7 +104,7 @@ cp /opt/wrolpi/etc/raspberrypios/mod_tile.conf /etc/apache2/conf-available/mod_t
carto -v
# Initialize the map if it has not been initialized.
sudo -u postgres psql -c '\l' | grep gis || yes | /opt/wrolpi/scripts/initialize_map_db.sh
sudo -u postgres psql -c '\l' | grep gis || /opt/wrolpi/scripts/initialize_map_db.sh
cp /opt/wrolpi/etc/raspberrypios/renderd.conf /etc/renderd.conf
# Configure Apache2 to listen on 8084.

View file

@ -4,7 +4,9 @@
source /opt/wrolpi/wrolpi/scripts/lib.sh
yes_or_no "Are you sure you want to initialize the map database? Data from imported maps will be lost." || exit 0
sudo -u postgres psql -c '\l' 2>/dev/null | grep gis >/dev/null && (
yes_or_no "Are you sure you want to initialize the map database? Data from imported maps will be lost." || exit 0
)
set -x