Skip to content

Commit

Permalink
create intermedieate directories for GEOSERVER_CONTEXT_ROOT (#553)
Browse files Browse the repository at this point in the history
to support multipart CONTEXT_ROOT (for example /prefix/geoserver) the directory up to the last past needs to be created
  • Loading branch information
m4ci3k2 authored Aug 9, 2023
1 parent 382c078 commit 314f0a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 314f0a8

Please sign in to comment.