Make valkey compatible with redis-sentinel to start sentinel (#731)

We already have similar changes to check-rdb / check-aof, apply
this change to sentinel.

Fixes #719.

Signed-off-by: Binbin <binloveplay1314@qq.com>
Signed-off-by: Ping Xie <pingxie@google.com>
This commit is contained in:
Binbin 2024-07-02 23:32:34 +08:00 committed by Ping Xie
parent 0210b642ce
commit 010609e8a0

View File

@ -6765,6 +6765,9 @@ void memtest(size_t megabytes, int passes);
int checkForSentinelMode(int argc, char **argv, char *exec_name) {
if (strstr(exec_name,"valkey-sentinel") != NULL) return 1;
/* valkey may install symlinks like redis-sentinel -> valkey-sentinel. */
if (strstr(exec_name, "redis-sentinel") != NULL) return 1;
for (int j = 1; j < argc; j++)
if (!strcmp(argv[j],"--sentinel")) return 1;
return 0;