diff --git a/bin/vps b/bin/vps index 242734d..21cdc42 100755 --- a/bin/vps +++ b/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."