• Wang Yuan's avatar
    Don't start in sentinel mode if only the folder name contains redis-sentinel (#9176) · 16e04ed9
    Wang Yuan authored
    Before this commit, redis-server starts in sentinel mode if the first startup
    argument has the string redis-sentinel, so redis also starts in sentinel mode
    if the directory it was started from contains the string redis-sentinel.
    Now we check the executable name instead of directory.
    
    Some examples:
    1. Execute ./redis-sentinel/redis/src/redis-sentinel, starts in sentinel mode.
    2. Execute ./redis-sentinel/redis/src/redis-server, starts in server mode,
       but before, redis will start in sentinel mode.
    3. Execute ./redis-sentinel/redis/src/redis-server --sentinel, of course, like
       before, starts in sentinel mode.
    16e04ed9
server.c 232 KB