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:
parent
0210b642ce
commit
010609e8a0
@ -6765,6 +6765,9 @@ void memtest(size_t megabytes, int passes);
|
|||||||
int checkForSentinelMode(int argc, char **argv, char *exec_name) {
|
int checkForSentinelMode(int argc, char **argv, char *exec_name) {
|
||||||
if (strstr(exec_name,"valkey-sentinel") != NULL) return 1;
|
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++)
|
for (int j = 1; j < argc; j++)
|
||||||
if (!strcmp(argv[j],"--sentinel")) return 1;
|
if (!strcmp(argv[j],"--sentinel")) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user