File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
operator/src/main/resources/scripts Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # Copyright (c) 2017, 2023 , Oracle and/or its affiliates.
3+ # Copyright (c) 2017, 2024 , Oracle and/or its affiliates.
44# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
66# Kubernetes periodically calls this liveness probe script to determine whether
@@ -73,10 +73,18 @@ if [ "${MOCK_WLS}" != 'true' ]; then
7373 # Adjust PATH if necessary before calling jps
7474 adjustPath
7575
76- if [ ` jps -v | grep -c " -Dweblogic.Name= ${SERVER_NAME} " ` -eq 0 ]; then
77- trace SEVERE " WebLogic Server instance process not found."
76+ if [ ` jps -l | grep -c " weblogic.NodeManager " ` -eq 0 ]; then
77+ trace SEVERE " WebLogic NodeManager process not found."
7878 exit $RETVAL
7979 fi
80+
81+ if [ ! -f ${STATEFILE} ] || [ ` grep -c " SHUT" ${STATEFILE} ` -eq 0 ]; then
82+ # Only check for running server instance if the state is not SHUTDOWN or SHUTTING_DOWN
83+ if [ ` jps -v | grep -c " -Dweblogic.Name=${SERVER_NAME} " ` -eq 0 ]; then
84+ trace SEVERE " WebLogic Server instance process not found."
85+ exit $RETVAL
86+ fi
87+ fi
8088fi
8189
8290if [ -f ${STATEFILE} ] && [ ` grep -c " FAILED" ${STATEFILE} ` -eq 1 ]; then
You can’t perform that action at this time.
0 commit comments