From 9d6d186963d0e01874700ad3ed02df5b3d25f28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Thu, 19 Sep 2024 14:03:08 +0500 Subject: [PATCH] Add SENTINEL_ID environment for fixed sentinel myid (#73) Signed-off-by: Ivan Co-authored-by: Ivan --- entrypoint-sentinel.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entrypoint-sentinel.sh b/entrypoint-sentinel.sh index 22fd71e..88f8c00 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 }