Skip to content

Commit

Permalink
add SENTINEL_ID for fixed sentinel myid
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan <[email protected]>
  • Loading branch information
Ivan committed Sep 19, 2024
1 parent 5f7751f commit 2976592
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions entrypoint-sentinel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
Expand Down

0 comments on commit 2976592

Please sign in to comment.