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 1
1
#! /bin/bash
2
2
3
- # Copyright (c) 2017, 2023 , Oracle and/or its affiliates.
3
+ # Copyright (c) 2017, 2024 , Oracle and/or its affiliates.
4
4
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
5
5
6
6
# Kubernetes periodically calls this liveness probe script to determine whether
@@ -73,10 +73,18 @@ if [ "${MOCK_WLS}" != 'true' ]; then
73
73
# Adjust PATH if necessary before calling jps
74
74
adjustPath
75
75
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."
78
78
exit $RETVAL
79
79
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
80
88
fi
81
89
82
90
if [ -f ${STATEFILE} ] && [ ` grep -c " FAILED" ${STATEFILE} ` -eq 1 ]; then
You can’t perform that action at this time.
0 commit comments