support for include directive in config parser
This commit is contained in:
parent
aa42c9a791
commit
b3f83f1272
2
redis.c
2
redis.c
@ -1701,6 +1701,8 @@ static void loadServerConfig(char *filename) {
|
||||
if (server.dbnum < 1) {
|
||||
err = "Invalid number of databases"; goto loaderr;
|
||||
}
|
||||
} else if (!strcasecmp(argv[0],"include") && argc == 2) {
|
||||
loadServerConfig(argv[1]);
|
||||
} else if (!strcasecmp(argv[0],"maxclients") && argc == 2) {
|
||||
server.maxclients = atoi(argv[1]);
|
||||
} else if (!strcasecmp(argv[0],"maxmemory") && argc == 2) {
|
||||
|
10
redis.conf
10
redis.conf
@ -278,3 +278,13 @@ shareobjectspoolsize 1024
|
||||
# configuration directives.
|
||||
hash-max-zipmap-entries 64
|
||||
hash-max-zipmap-value 512
|
||||
|
||||
################################## INCLUDES ###################################
|
||||
|
||||
# Include one or more other config files here. This is useful if you
|
||||
# have a standard template that goes to all redis server but also need
|
||||
# to customize a few per-server settings. Include files can include
|
||||
# other files, so use this wisely.
|
||||
#
|
||||
# include /path/to/local.conf
|
||||
# include /path/to/other.conf
|
||||
|
Loading…
Reference in New Issue
Block a user