zulip/healthcheck.redis.sh
2025-02-12 19:52:03 -05:00

10 lines
160 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