113113# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #
114114# ##################################
115115
116+ # Marker file for the healthcheck
117+ rm -f /tmp/.oracle_database_started
118+
116119# Check whether container has enough memory
117120if [[ -f /sys/fs/cgroup/cgroup.controllers ]]; then
118121 memory=$( cat /sys/fs/cgroup/memory.max)
280283 " $ORACLE_BASE " /" $CREATE_DB_FILE " $ORACLE_SID " $ORACLE_PDB " " $ORACLE_PWD " || exit 1;
281284
282285 # Check whether database is successfully created
283- if " $ORACLE_BASE " /" $CHECK_DB_FILE " ; then
286+ if BYPASS_STARTED_MARKER=true " $ORACLE_BASE " /" $CHECK_DB_FILE " ; then
284287 # Create a checkpoint file if database is successfully created
285288 # Populate the checkpoint file with the current date to avoid timing issue when using NFS persistence in multi-replica mode
286289 echo " $( date -Iseconds) " > " $ORACLE_BASE " /oradata/.${ORACLE_SID} " ${CHECKPOINT_FILE_EXTN} "
303306fi ;
304307
305308# Check whether database is up and running
306- " $ORACLE_BASE " /" $CHECK_DB_FILE "
309+ BYPASS_STARTED_MARKER=true " $ORACLE_BASE " /" $CHECK_DB_FILE "
307310status=$?
308311
309312# Check whether database is up and running
@@ -317,7 +320,9 @@ if [ $status -eq 0 ]; then
317320
318321 # Execute custom provided startup scripts
319322 " $ORACLE_BASE " /" $USER_SCRIPTS_FILE " " $ORACLE_BASE " /scripts/startup
320-
323+
324+ # Marker file for the healthcheck
325+ touch /tmp/.oracle_database_started
321326else
322327 echo " #####################################"
323328 echo " ########### E R R O R ###############"
0 commit comments