Martin Mágr 4386128f37 Add healthcheck script for memcached
This patch adds script for docker health check of memcached service.
The script checks the service using socat.

Change-Id: Icae9acdd6b10b341c1b189872b7ef864d7ea0806
Depends-On: Ibda77a8d041d894f5efac6578e52b11651bca97f
2018-02-19 13:33:04 +00:00

6 lines
163 B
Bash

#!/bin/bash
listen_addr=$(awk 'match($0, /-l +([0-9a-fA-F\.\:]+) /, a) {print a[1]}' /etc/sysconfig/memcached)
echo "stats" | socat - TCP:$listen_addr:11211
exit