From 2976592bc28d00886c94e2babaaa4c1cbbc04aa8 Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 19 Sep 2024 13:41:19 +0500 Subject: [PATCH] add SENTINEL_ID for fixed sentinel myid 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..446ae32 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 }