Skip to content

Commit

Permalink
GRP-3062: on container start the apache pid file should be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
mchyzer committed Jan 31, 2021
1 parent fe35111 commit fe254c1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions container_files/usr-local-bin/librarySetupFiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fe254c1

Please sign in to comment.