Skip to content

Commit

Permalink
Fix running backup and restore plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakudyaA committed Dec 31, 2024
1 parent 62c0810 commit 578386b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export JAVA_OPTS="${JAVA_OPTS} ${GEOSERVER_OPTS}"
# Chown again - seems to fix issue with resolving all created directories
if [[ ${RUN_AS_ROOT} =~ [Ff][Aa][Ll][Ss][Ee] ]];then
dir_ownership=("${CATALINA_HOME}" /home/"${USER_NAME}"/ "${COMMUNITY_PLUGINS_DIR}"
"${STABLE_PLUGINS_DIR}" "${REQUIRED_PLUGINS_DIR}" "${GEOSERVER_HOME}" /usr/share/fonts/ /tomcat_apps.zip
"${STABLE_PLUGINS_DIR}" "${REQUIRED_PLUGINS_DIR}" "${GEOSERVER_HOME}" /usr/share/fonts/
/tmp/ "${FOOTPRINTS_DATA_DIR}" "${CERT_DIR}" "${FONTS_DIR}" /scripts/
"${EXTRA_CONFIG_DIR}" "/docker-entrypoint-geoserver.d" "${MONITOR_AUDIT_PATH}")
for directory in "${dir_ownership[@]}"; do
Expand Down
6 changes: 3 additions & 3 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ rm -f /tmp/resources/overlays/README.txt &&
# Package tomcat webapps - useful to activate later
if [[ -d "${CATALINA_HOME}"/webapps.dist ]]; then
mv "${CATALINA_HOME}"/webapps.dist /tomcat_apps
zip -r /tomcat_apps.zip /tomcat_apps
zip -r "${REQUIRED_PLUGINS_DIR}"/tomcat_apps.zip /tomcat_apps
rm -r /tomcat_apps
else
cp -r "${CATALINA_HOME}"/webapps/ROOT /tomcat_apps
cp -r "${CATALINA_HOME}"/webapps/docs /tomcat_apps
cp -r "${CATALINA_HOME}"/webapps/examples /tomcat_apps
cp -r "${CATALINA_HOME}"/webapps/host-manager /tomcat_apps
cp -r "${CATALINA_HOME}"/webapps/manager /tomcat_apps
zip -r /tomcat_apps.zip /tomcat_apps
rm -r /tomcat_apps
zip -r "${REQUIRED_PLUGINS_DIR}"/tomcat_apps.zip /tomcat_apps
rm -rf /tomcat_apps
fi

pushd ${CATALINA_HOME}/lib || exit
Expand Down
8 changes: 6 additions & 2 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,12 @@ fi


if [[ "${TOMCAT_EXTRAS}" =~ [Tt][Rr][Uu][Ee] ]]; then
unzip -qq /tomcat_apps.zip -d /tmp/ &&
cp -r /tmp/tomcat_apps/webapps.dist/* "${CATALINA_HOME}"/webapps/ &&
unzip -qq "${REQUIRED_PLUGINS_DIR}"/tomcat_apps.zip -d /tmp/
if [[ -d /tmp/tomcat_apps/webapps.dist ]];then
cp -r /tmp/tomcat_apps/webapps.dist/* "${CATALINA_HOME}"/webapps/
else
cp -r /tmp/tomcat_apps/* "${CATALINA_HOME}"/webapps/
fi
rm -r /tmp/tomcat_apps
if [[ ${POSTGRES_JNDI} =~ [Ff][Aa][Ll][Ss][Ee] ]]; then
if [[ -f ${EXTRA_CONFIG_DIR}/context.xml ]]; then
Expand Down

0 comments on commit 578386b

Please sign in to comment.