allianceauth/docker/conf/redis_healthcheck.sh
2023-11-09 18:54:19 +10:00

11 lines
164 B
Bash

#!/bin/bash
set -eo pipefail
host="$(hostname -i || echo '127.0.0.1')"
if ping="$(redis-cli -h "$host" ping)" && [ "$ping" = 'PONG' ]; then
exit 0
fi
exit 1