Skip to content

Commit

Permalink
catch return values
Browse files Browse the repository at this point in the history
  • Loading branch information
oehrlis committed Mar 30, 2023
1 parent 103ccdf commit d30fe71
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions local/oudbase/bin/oud_start_stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ for oud_inst in ${OUD_INST_LIST}; do
if [ ${OUDSTATUS_ERROR} -eq 0 ] && [ ${FORCE} == "TRUE" ]; then
if [ ${DIRECTORY_TYPE} == "OUD" ]; then
DoMsg "INFO : [$oud_inst] Instance $oud_inst forced to restart."
$OUD_INSTANCE_HOME/OUD/bin/stop-ds >> ${INSTANCE_LOGFILE} 2>&1
$OUD_INSTANCE_HOME/OUD/bin/start-ds >> ${INSTANCE_LOGFILE} 2>&1
($OUD_INSTANCE_HOME/OUD/bin/stop-ds || DoMsg "WARN : stop-ds returned $?") >> ${INSTANCE_LOGFILE} 2>&1
($OUD_INSTANCE_HOME/OUD/bin/start-ds || DoMsg "WARN : start-ds returned $?") >> ${INSTANCE_LOGFILE} 2>&1
elif [ ${DIRECTORY_TYPE} == "OUDSM" ]; then
DoMsg "WARN : [$oud_inst] force not supported for OUDSM. Skip $MyActivity force for this instance."
else
Expand All @@ -219,7 +219,7 @@ for oud_inst in ${OUD_INST_LIST}; do
else
# check directory type
if [ ${DIRECTORY_TYPE} == "OUD" ]; then
$OUD_INSTANCE_HOME/OUD/bin/start-ds >> ${INSTANCE_LOGFILE} 2>&1
($OUD_INSTANCE_HOME/OUD/bin/start-ds || DoMsg "WARN : start-ds returned $?") >> ${INSTANCE_LOGFILE} 2>&1
elif [ ${DIRECTORY_TYPE} == "OUDSM" ]; then
# clean up old WLS lok, DAT files
find $OUD_INSTANCE_HOME/servers -name "*.lok" -exec rm -f {} \; 2>/dev/null
Expand Down Expand Up @@ -261,7 +261,7 @@ for oud_inst in ${OUD_INST_LIST}; do
fi
elif [ "$MyActivity" == "STOP" ]; then
if [ ${DIRECTORY_TYPE} == "OUD" ]; then
$OUD_INSTANCE_HOME/OUD/bin/stop-ds >> ${INSTANCE_LOGFILE} 2>&1
($OUD_INSTANCE_HOME/OUD/bin/stop-ds || DoMsg "WARN : stop-ds returned $?")>> ${INSTANCE_LOGFILE} 2>&1
elif [ "${DIRECTORY_TYPE}" == "OUDSM" ]; then
nohup $OUD_INSTANCE_HOME/bin/stopWebLogic.sh >> ${INSTANCE_LOGFILE} 2>&1 &
if [ "${WAIT}" == "TRUE" ]; then
Expand Down Expand Up @@ -304,8 +304,8 @@ for oud_inst in ${OUD_INST_LIST}; do
fi
elif [ "$MyActivity" == "RESTART" ]; then
if [ ${DIRECTORY_TYPE} == "OUD" ]; then
$OUD_INSTANCE_HOME/OUD/bin/stop-ds >> ${INSTANCE_LOGFILE} 2>&1
$OUD_INSTANCE_HOME/OUD/bin/start-ds >> ${INSTANCE_LOGFILE} 2>&1
($OUD_INSTANCE_HOME/OUD/bin/stop-ds || DoMsg "WARN : stop-ds returned $?") >> ${INSTANCE_LOGFILE} 2>&1
($OUD_INSTANCE_HOME/OUD/bin/start-ds || DoMsg "WARN : start-ds returned $?") >> ${INSTANCE_LOGFILE} 2>&1
elif [ ${DIRECTORY_TYPE} == "OUDSM" ]; then
DoMsg "WARN : [$oud_inst] $MyActivity not supported for OUDSM. Skip $MyActivity for this instance."
else
Expand Down

0 comments on commit d30fe71

Please sign in to comment.