From 314f0a872ed665759b14414abd86992256f1318a Mon Sep 17 00:00:00 2001 From: m4ci3k2 Date: Wed, 9 Aug 2023 18:02:53 +0200 Subject: [PATCH] create intermedieate directories for GEOSERVER_CONTEXT_ROOT (#553) to support multipart CONTEXT_ROOT (for example /prefix/geoserver) the directory up to the last past needs to be created --- scripts/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 00c4091f..a2532f95 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -35,6 +35,7 @@ if [ x"${GEOSERVER_CONTEXT_ROOT}" != xgeoserver ]; then echo "INFO: changing context-root to '${GEOSERVER_CONTEXT_ROOT}'." GEOSERVER_INSTALL_DIR="$(detect_install_dir)" if [ -e "${GEOSERVER_INSTALL_DIR}/webapps/geoserver" ]; then + mkdir -p "$(dirname -- "${GEOSERVER_INSTALL_DIR}/webapps/${GEOSERVER_CONTEXT_ROOT}")" mv "${GEOSERVER_INSTALL_DIR}/webapps/geoserver" "${GEOSERVER_INSTALL_DIR}/webapps/${GEOSERVER_CONTEXT_ROOT}" else echo "WARN: '${GEOSERVER_INSTALL_DIR}/webapps/geoserver' not found, probably already renamed as this is probably a container restart and not first run."