Browse Source
Merge pull request #2697 from hxzh/master
Add ss-manager read manager_address argurment from config file
pull/2719/head
Max Lv
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
6 additions and
0 deletions
-
src/jconf.c
-
src/jconf.h
-
src/manager.c
|
|
@ -342,6 +342,8 @@ read_jconf(const char *file) |
|
|
|
conf.workdir = to_string(value); |
|
|
|
} else if (strcmp(name, "acl") == 0) { |
|
|
|
conf.acl = to_string(value); |
|
|
|
} else if (strcmp(name, "manager_address") == 0) { |
|
|
|
conf.manager_address = to_string(value); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
@ -84,6 +84,7 @@ typedef struct { |
|
|
|
int no_delay; |
|
|
|
char *workdir; |
|
|
|
char *acl; |
|
|
|
char *manager_address; |
|
|
|
} jconf_t; |
|
|
|
|
|
|
|
jconf_t *read_jconf(const char *file); |
|
|
|
|
|
@ -1054,6 +1054,9 @@ main(int argc, char **argv) |
|
|
|
if (acl == NULL) { |
|
|
|
acl = conf->acl; |
|
|
|
} |
|
|
|
if (manager_address == NULL) { |
|
|
|
manager_address = conf->manager_address; |
|
|
|
} |
|
|
|
#ifdef HAVE_SETRLIMIT |
|
|
|
if (nofile == 0) { |
|
|
|
nofile = conf->nofile; |
|
|
|