mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-25 10:42:14 -04:00
to be merged: replace -S by --server
This commit is contained in:
parent
fd3f99e348
commit
1409eff884
1 changed files with 10 additions and 13 deletions
|
|
@ -38,7 +38,7 @@ static void hld_usage(char *name, int argc, int line)
|
|||
" -C dump the configuration and exit\n"
|
||||
" -H \"foo:bar\" add this header name and value\n"
|
||||
" -I use HEAD instead of GET\n"
|
||||
" -S set server options as defined for \"server\" haproxy keyword\n"
|
||||
" -server set server options as defined for \"server\" haproxy keyword\n"
|
||||
" -v shows version\n"
|
||||
" --show-status-codes show HTTP status codes distribution\n"
|
||||
" --traces enable the traces for all the HTTP protocols\n"
|
||||
|
|
@ -273,6 +273,15 @@ void haproxy_init_args(int argc, char **argv)
|
|||
else if (strcmp(opt, "show-status-codes") == 0) {
|
||||
arg_hscd = 1;
|
||||
}
|
||||
else if (strcmp(opt, "server") == 0) {
|
||||
argv++, argc--;
|
||||
|
||||
if ((argc <= 0 || **argv == '-'))
|
||||
hld_usage(progname, argc, __LINE__);
|
||||
|
||||
opt = *argv;
|
||||
ssl_opts = strdup(opt);
|
||||
}
|
||||
else
|
||||
hld_usage(progname, argc, __LINE__);
|
||||
}
|
||||
|
|
@ -357,18 +366,6 @@ void haproxy_init_args(int argc, char **argv)
|
|||
|
||||
hbuf_str_append(&gbuf, *argv);
|
||||
}
|
||||
else if (*opt == 'S') {
|
||||
opt++;
|
||||
if (!*opt) {
|
||||
argv++, argc--;
|
||||
|
||||
if ((argc <= 0 || **argv == '-'))
|
||||
hld_usage(progname, argc, __LINE__);
|
||||
|
||||
opt = *argv;
|
||||
}
|
||||
ssl_opts = strdup(opt);
|
||||
}
|
||||
else if (*opt == 'v') {
|
||||
/* empty option */
|
||||
if (*(opt + 1))
|
||||
|
|
|
|||
Loading…
Reference in a new issue