提交 b3f83f12 编写于 作者: J Jeremy Zawodny

support for include directive in config parser

上级 aa42c9a7
......@@ -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) {
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册