summaryrefslogtreecommitdiff
path: root/docker/base/healthcheck_socket
blob: cd65bae69e496b56b791e3b06008c5ab1e35e456 (plain)
1
2
3
4
5
6
7
8
9
10
#!/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"