79851d7929
blueprint container-health-check Now docker supports healthcheck directive[0] in Dockerfile, which is helpful for checking container aliveness. Base for this patch were healthcheck scripts from tripleo[1]. [0] https://docs.docker.com/engine/reference/builder/#healthcheck [1] https://github.com/openstack/tripleo-common/tree/master/healthcheck Change-Id: Ifc32713cd4d6b45c74855c0ebf5bb65784701d44
11 lines
227 B
Bash
Executable File
11 lines
227 B
Bash
Executable File
#!/bin/bash
|
|
process=$1
|
|
socket=$2
|
|
|
|
# lsof truncate command name to 15 characters and this behaviour
|
|
# cannot be disabled
|
|
if [ ${#process} -gt 15 ] ; then
|
|
process=${process:0:15}
|
|
fi
|
|
lsof -Fc -Ua $socket | grep -q "c$process"
|