Fixing upgrade which deletes the wrong map blob. Fixing the port so the old map database is deleted.

This commit is contained in:
Roland 2025-01-12 11:05:43 -07:00
parent cef4335a53
commit bd599e1b2b
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
3 changed files with 4 additions and 4 deletions

View file

@ -28,8 +28,8 @@ set -x
systemctl stop renderd
# Delete old map database, if it exists.
sudo -iu postgres dropdb --port=5433 gis || :
sudo -iu postgres dropuser --port=5433 _renderd || :
sudo -iu postgres dropdb --port=5432 gis || :
sudo -iu postgres dropuser --port=5432 _renderd || :
# Delete new map database, it will be created again.
sudo -iu postgres dropdb --port=5433 gis || :
sudo -iu postgres dropuser --port=5433 _renderd || :

View file

@ -24,7 +24,7 @@ if [[ ! -f ${MAP_DB_BLOB} || ! -s ${MAP_DB_BLOB} ]]; then
fi
if [[ -f /opt/wrolpi-blobs/gis-map.dump.gz && -s ${MAP_DB_BLOB} ]]; then
# Remove old blob now that we have the new one.
rm ${MAP_DB_BLOB}
rm /opt/wrolpi-blobs/gis-map.dump.gz
fi
# Migrate map DB if necessary. Do this before repair because it will reset map if map db is empty.

View file

@ -1 +1 @@
0.15.1-beta
0.15.2-beta