mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-25 18:40:06 -04:00
Repairing openstreetmap-carto project.mml in case the port is removed by git, restarting renderd after map services are configured.
This commit is contained in:
parent
306bf798be
commit
3285887a1b
1 changed files with 8 additions and 1 deletions
|
|
@ -81,7 +81,6 @@ a2enmod ssl
|
|||
a2enmod headers
|
||||
|
||||
systemctl enable renderd
|
||||
systemctl start renderd
|
||||
/usr/bin/systemctl daemon-reload
|
||||
|
||||
# WROLPi needs a few privileged commands.
|
||||
|
|
@ -115,6 +114,13 @@ carto -v
|
|||
systemctl enable postgresql@15-map.service || :
|
||||
systemctl start postgresql@15-map.service || :
|
||||
sudo -iu postgres psql -c '\l' --port=5433 | grep -q gis || yes | /opt/wrolpi/scripts/initialize_map_db.sh
|
||||
# Update openstreetmap-carto to use the new database.
|
||||
grep -q 'port: 5433' /opt/openstreetmap-carto/project.mml || (
|
||||
# Append port line after dbname configuration line.
|
||||
sed -i '/dbname: "gis"/a \ port: 5433' /opt/openstreetmap-carto/project.mml
|
||||
(cd /opt/openstreetmap-carto/ && carto project.mml >mapnik.xml)
|
||||
chown -R _renderd:_renderd /opt/openstreetmap-carto
|
||||
)
|
||||
|
||||
cp /opt/wrolpi/etc/raspberrypios/renderd.conf /etc/renderd.conf
|
||||
# Configure Apache2 to listen on 8084.
|
||||
|
|
@ -140,6 +146,7 @@ chown -R wrolpi:wrolpi /home/wrolpi /opt/wrolpi*
|
|||
# Copy MOTD once the repair has been successful.
|
||||
cp /opt/wrolpi/etc/raspberrypios/motd /etc/motd
|
||||
|
||||
systemctl restart renderd
|
||||
systemctl restart wrolpi-help
|
||||
systemctl start wrolpi.target
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue