Returns 1 if there is --sentinel among the arguments or if * argv[0] contains "keydb-sentinel". */
| 7026 | /* Returns 1 if there is --sentinel among the arguments or if |
| 7027 | * argv[0] contains "keydb-sentinel". */ |
| 7028 | int checkForSentinelMode(int argc, char **argv) { |
| 7029 | int j; |
| 7030 | |
| 7031 | if (strstr(argv[0],"keydb-sentinel") != NULL) return 1; |
| 7032 | for (j = 1; j < argc; j++) |
| 7033 | if (!strcmp(argv[j],"--sentinel")) return 1; |
| 7034 | return 0; |
| 7035 | } |
| 7036 | |
| 7037 | /* Function called at startup to load RDB or AOF file in memory. */ |
| 7038 | void loadDataFromDisk(void) { |