Skip to content

Commit f90e405

Browse files
committed
before prod-1
1 parent 06ca149 commit f90e405

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

run.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ do
141141
pkill dockerd
142142
while pgrep -l dockerd
143143
do
144+
[[ -n "${SIGTERM}" ]] && break 2
144145
(( CNT++ ))
145146
echo ".... old dockerd is still running - $(date)"
146147
if [[ ${CNT} -ge 120 ]]; then
@@ -160,6 +161,7 @@ do
160161
CNT=0
161162
while ! bolter -f ${CONTEINERD_DB}
162163
do
164+
[[ -n "${SIGTERM}" ]] && break 2
163165
echo "$(date) - Waiting for containerd boltd ${CONTEINERD_DB}"
164166
(( CNT++ ))
165167
if (( CNT > ${DOCKERD_LOCK_MAXWAIT} )); then
@@ -178,6 +180,7 @@ do
178180
CNT=0
179181
while ! test -f "${DOCKERD_PID_FILE}" || test -z "$(cat ${DOCKERD_PID_FILE})"
180182
do
183+
[[ -n "${SIGTERM}" ]] && break 2
181184
echo "$(date) - Waiting for docker pid file ${DOCKERD_PID_FILE}"
182185
(( CNT++ ))
183186
if (( CNT > ${DOCKERD_PID_MAXWAIT} )); then
@@ -191,6 +194,7 @@ do
191194
CNT=0
192195
while ! docker ps
193196
do
197+
[[ -n "${SIGTERM}" ]] && break 2
194198
echo "$(date) - Waiting for docker running by check docker ps "
195199
(( CNT++ ))
196200
if (( CNT > ${DOCKER_UP_MAXWAIT} )); then
@@ -204,7 +208,7 @@ do
204208
done
205209

206210
# Starting cleaner agent
207-
if [[ -z "${DISABLE_CLEANER_AGENT}" ]]; then
211+
if [[ -z "${DISABLE_CLEANER_AGENT}" && -z "${SIGTERM}" ]]; then
208212
${DIR}/cleaner/cleaner-agent.sh <&- &
209213
CLEANER_AGENT_PID=$!
210214
fi

0 commit comments

Comments
 (0)