From 2462a0c1c011918c288ff101a95afdd53d4f28d3 Mon Sep 17 00:00:00 2001 From: mchyzer Date: Sun, 19 Jul 2020 15:38:38 -0400 Subject: [PATCH] 2.5.30 initial release --- Dockerfile | 4 ++-- container_files/usr-local-bin/entrypoint.sh | 2 +- container_files/usr-local-bin/libraryPrep.sh | 22 +++++++++++++++++++ .../usr-local-bin/librarySetupFiles.sh | 12 +++++++++- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9daf9c2c..a0df51d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN yum update -y \ RUN yum install -y wget tar unzip dos2unix patch ARG GROUPER_CONTAINER_VERSION -ENV GROUPER_VERSION=2.5.29 \ +ENV GROUPER_VERSION=2.5.30 \ GROUPER_CONTAINER_VERSION=$GROUPER_CONTAINER_VERSION # Install Corretto Java JDK @@ -32,7 +32,7 @@ RUN echo 'Installing Grouper'; \ cd /opt/grouper/$GROUPER_VERSION/ \ && $JAVA_HOME/bin/java -cp :grouperInstaller.jar edu.internet2.middleware.grouperInstaller.GrouperInstaller FROM centos:centos7 as cleanup -ENV GROUPER_VERSION=2.5.29 \ +ENV GROUPER_VERSION=2.5.30 \ TOMEE_VERSION=7.0.0 RUN mkdir -p /opt/grouper/grouperWebapp/ RUN mkdir -p /opt/tomee/ diff --git a/container_files/usr-local-bin/entrypoint.sh b/container_files/usr-local-bin/entrypoint.sh index 20b5dce0..51f2dfcc 100755 --- a/container_files/usr-local-bin/entrypoint.sh +++ b/container_files/usr-local-bin/entrypoint.sh @@ -18,6 +18,6 @@ else GROUPER_ENTRYPOINT_COMMAND="$@" fi - echo executing GROUPER_ENTRYPOINT_COMMAND + echo executing "$GROUPER_ENTRYPOINT_COMMAND" exec "$GROUPER_ENTRYPOINT_COMMAND" fi diff --git a/container_files/usr-local-bin/libraryPrep.sh b/container_files/usr-local-bin/libraryPrep.sh index dcd0c042..f77f25aa 100644 --- a/container_files/usr-local-bin/libraryPrep.sh +++ b/container_files/usr-local-bin/libraryPrep.sh @@ -88,6 +88,14 @@ prep_ws() { prep_conf() { + # if we are stopping and starting, we just read the env vars and we done + if [ -f /opt/grouper/grouperEnv.sh ] + then + echo "Loading env vars from /opt/grouper/grouperEnv.sh" + . /opt/grouper/grouperEnv.sh + return + fi + prep_initDeprecatedEnvVars setupPipe_logging setupPipe_supervisordLog @@ -181,6 +189,14 @@ prep_finishEnd() { prep_finish() { + if [ "$GROUPER_SETUP_FILES_COMPLETE" = "true" ] + then + echo "GROUPER_SETUP_FILES_COMPLETE=true, skipping startup prep" + prep_unsetAllAndFromFiles + + return + fi + grouperScriptHooks_prepComponentPost prep_finishBegin @@ -195,6 +211,10 @@ prep_finish() { grouperScriptHooks_finishPrepPost + prep_unsetAllAndFromFiles +} + +prep_unsetAllAndFromFiles() { prep_unsetAll prepOnly_unsetAll } @@ -212,6 +232,7 @@ prep_unsetAll() { unset -f prep_runWs unset -f prep_scim unset -f prep_unsetAll + unset -f prep_unsetAllAndFromFiles unset -f prep_ui unset -f prep_ws @@ -230,6 +251,7 @@ prep_exportAll() { export -f prep_runWs export -f prep_scim export -f prep_unsetAll + export -f prep_unsetAllAndFromFiles export -f prep_ui export -f prep_ws } diff --git a/container_files/usr-local-bin/librarySetupFiles.sh b/container_files/usr-local-bin/librarySetupFiles.sh index 91a531ee..99adda40 100644 --- a/container_files/usr-local-bin/librarySetupFiles.sh +++ b/container_files/usr-local-bin/librarySetupFiles.sh @@ -92,6 +92,8 @@ setupFiles() { if [ "$GROUPER_SETUP_FILES_COMPLETE" = "true" ] then + echo "GROUPER_SETUP_FILES_COMPLETE=true, skipping setting up files" + setupFiles_unsetAllAndFromFiles return fi @@ -128,7 +130,12 @@ setupFiles() { grouperScriptHooks_setupFilesPostChown export GROUPER_SETUP_FILES_COMPLETE=true + echo 'export GROUPER_SETUP_FILES_COMPLETE=true' >> /opt/grouper/grouperEnv.sh + setupFiles_unsetAllAndFromFiles +} + +setupFiles_unsetAllAndFromFiles() { setupFiles_unsetAll setupFilesApache_unsetAll setupFilesForComponent_unsetAll @@ -136,9 +143,10 @@ setupFiles() { setupFilesTomcat_unsetAll setupPipe_unsetAll grouperScriptHooks_unsetAll - + } + setupFiles_unsetAll() { unset -f setupFiles unset -f setupFiles_chownDirs @@ -148,6 +156,7 @@ setupFiles_unsetAll() { unset -f setupFiles_rsyncSlashRoot unset -f setupFiles_storeEnvVars unset -f setupFiles_unsetAll + unset -f setupFiles_unsetAllAndFromFiles } setupFiles_exportAll() { @@ -159,6 +168,7 @@ setupFiles_exportAll() { export -f setupFiles_rsyncSlashRoot export -f setupFiles_storeEnvVars export -f setupFiles_unsetAll + export -f setupFiles_unsetAllAndFromFiles } # export everything