From b47023ea5d3f63df064f8dc91601bcf94dce65f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Mon, 26 Feb 2024 14:58:47 +0500 Subject: [PATCH] Update entrypoint-sentinel.sh add SENTINEL_ID Signed-off-by: Ivan --- entrypoint-sentinel.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entrypoint-sentinel.sh b/entrypoint-sentinel.sh index 174e90a..73ea2dd 100755 --- a/entrypoint-sentinel.sh +++ b/entrypoint-sentinel.sh @@ -24,6 +24,9 @@ sentinel_mode_setup(){ if [[ -n "${MASTER_PASSWORD}" ]];then echo "sentinel auth-pass ${MASTER_GROUP_NAME} ${MASTER_PASSWORD}" fi + if [[ -n "${SENTINEL_ID}" ]];then + (echo -n "sentinel myid "; echo ${SENTINEL_ID} | sha1sum | awk '{ print $1 }') + fi }>> /etc/redis/sentinel.conf }