tripleo-common/healthcheck/memcached

8 lines
278 B
Bash
Executable File

#!/bin/bash
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
listen_addr=$(wrap_ipv6 $(awk 'match($0, /-l +([0-9a-fA-F\.\:]+) /, a) {print a[1]}' /etc/sysconfig/memcached))
echo "version" | socat - TCP:$listen_addr:11211 1>/dev/null
exit $?