feat: ensure that the datadir always exists

pull/123/head
Nils Bühner 2024-11-21 16:49:19 +01:00
parent 887b98e352
commit bc10da56a3
1 changed files with 8 additions and 3 deletions

View File

@ -43,6 +43,12 @@ DEFAULT_HEALTHCHECK_URL="http://${DEFAULT_HEALTHCHECK_URL}"
# write the healthcheck URL to a file that geoserver user has access to but is not served by tomcat
echo "${HEALTHCHECK_URL:-$DEFAULT_HEALTHCHECK_URL}" > $CATALINA_HOME/conf/healthcheck_url.txt
# ensure that GEOSERVER_DATA_DIR exists as a directory
if [ ! -e "$GEOSERVER_DATA_DIR" ]; then
mkdir -p $GEOSERVER_DATA_DIR
echo "Created new GeoServer data directory $GEOSERVER_DATA_DIR as it did not exist."
fi
if [ "${SKIP_DEMO_DATA}" = "true" ]; then
# skipping demo data
@ -209,4 +215,3 @@ then
else
exec $CATALINA_HOME/bin/catalina.sh run -Dorg.apache.catalina.connector.RECYCLE_FACADES=true
fi