Browse Source

fix: [check-fix] repair unable to find PID cases

rc1
Valentin Lab 1 year ago
parent
commit
d543b82766
  1. 4
      bin/vps

4
bin/vps

@ -944,7 +944,9 @@ container:health:check-fix() {
if [ "$errlvl" == 124 ]; then
service_name=$(docker ps --filter id="$container_id" --format '{{.Label "com.docker.compose.service"}}')
container_name=($(docker ps --filter id="$container_id" --format '{{.Names}}'))
pid=$(ps ax -o pid,command -ww | grep docker-containerd-shim | grep "/$container_id" |
pid=$(ps ax -o pid,command -ww | grep docker-containerd-shim |
grep "/$container_id" |
sed -r 's/^ *//g' |
cut -f 1 -d " ")
if [ -z "$pid" ]; then
err "container ${DARKCYAN}${container_name[0]}${NORMAL} for ${DARKYELLOW}$service_name${NORMAL} doesn't answer to 'inspect' command. Can't find its PID neither."

Loading…
Cancel
Save