Load functions after service start

This commit is contained in:
Florian Stosse
2025-08-29 17:51:46 +02:00
parent 95b16e8c49
commit 32e09c024e

9
run.sh
View File

@@ -135,6 +135,9 @@ if [ "$1" == "import" ]; then
sudo -u postgres psql -d gis -f /data/style/${NAME_SQL:-indexes.sql}
fi
# Load functions for OSM Carto v5.9.0
sudo -u postgres psql -d gis -f /data/functions.sql
#Import external data
chown -R renderer: /home/renderer/src/ /data/style/
if [ -f /data/style/scripts/get-external-data.py ] && [ -f /data/style/external-data.yml ]; then
@@ -181,15 +184,15 @@ if [ "$1" == "run" ]; then
echo "export APACHE_ARGUMENTS='-D ALLOW_CORS'" >> /etc/apache2/envvars
fi
# Load functions for OSM Carto v5.9.0
sudo -u postgres psql -d gis -f /data/functions.sql
# Initialize PostgreSQL and Apache
createPostgresConfig
service postgresql start
service apache2 restart
setPostgresPassword
# Load functions for OSM Carto v5.9.0
sudo -u postgres psql -d gis -f /data/functions.sql
# Configure renderd threads
sed -i -E "s/num_threads=[0-9]+/num_threads=${THREADS:-4}/g" /etc/renderd.conf