From fe254c1d0b400630ed5115f9ab32af01d53dc41f Mon Sep 17 00:00:00 2001 From: Chris Hyzer Date: Sun, 31 Jan 2021 15:08:49 -0500 Subject: [PATCH] GRP-3062: on container start the apache pid file should be removed --- container_files/usr-local-bin/librarySetupFiles.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/container_files/usr-local-bin/librarySetupFiles.sh b/container_files/usr-local-bin/librarySetupFiles.sh index 34bacdee..1ef7e9a9 100644 --- a/container_files/usr-local-bin/librarySetupFiles.sh +++ b/container_files/usr-local-bin/librarySetupFiles.sh @@ -270,8 +270,19 @@ setupFiles_analyzeOriginalFiles() { } +setupFiles_removePids() { + if [ "$GROUPER_RUN_APACHE" = "true" ] && [ -f /run/httpd/httpd.pid ]; then + rm -f /run/httpd/httpd.pid + returnCode=$? + echo "grouperContainer; INFO: (librarySetupFiles.sh-setupFiles_removePids) rm -f /run/httpd/httpd.pid , result: $returnCode" + if [ $returnCode != 0 ]; then exit $returnCode; fi + fi +} + setupFiles() { + setupFiles_removePids + if [ "$GROUPER_SETUP_FILES_COMPLETE" = "true" ] then echo "grouperContainer; INFO: (librarySetupFiles.sh-setupFiles) GROUPER_SETUP_FILES_COMPLETE=true, skipping setting up files (including not syncing slashRoot again)" @@ -337,6 +348,7 @@ setupFiles_unsetAll() { unset -f setupFiles_localLogging unset -f setupFiles_loggingPrefix unset -f setupFiles_originalFile + unset -f setupFiles_removePids unset -f setupFiles_rsyncSlashRoot unset -f setupFiles_storeEnvVars unset -f setupFiles_unsetAll @@ -351,6 +363,7 @@ setupFiles_exportAll() { export -f setupFiles_localLogging export -f setupFiles_loggingPrefix export -f setupFiles_originalFile + export -f setupFiles_removePids export -f setupFiles_rsyncSlashRoot export -f setupFiles_storeEnvVars export -f setupFiles_unsetAll