X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2Fmain.c;h=a72585e28377a1157bcae85459bc73176b14d8d3;hb=8a870a65d0afc49455b4b5ff2b0ce585e0bd8339;hp=86bd8604be39ba7b6687ed584f4ab88760e5e01c;hpb=719ba47914bad933bf4503d3340b9543d5e631a6;p=netdata.git diff --git a/src/main.c b/src/main.c index 86bd8604..a72585e2 100644 --- a/src/main.c +++ b/src/main.c @@ -230,6 +230,7 @@ struct option_def options[] = { { 't', "The internal clock of netdata.", "seconds", "1"}, { 'u', "Run as user.", "username", "netdata"}, { 'v', "Print netdata version and exit.", NULL, NULL}, + { 'V', "Print netdata version and exit.", NULL, NULL}, { 'W', "See Advanced options below.", "options", NULL}, }; @@ -365,7 +366,10 @@ static void backwards_compatible_config() { web_server_mode = (mode)?WEB_SERVER_MODE_MULTI_THREADED:WEB_SERVER_MODE_SINGLE_THREADED; } - // move [global] options to the [api] section + // move [global] options to the [web] section + config_move(CONFIG_SECTION_GLOBAL, "http port listen backlog", + CONFIG_SECTION_WEB, "listen backlog"); + config_move(CONFIG_SECTION_GLOBAL, "bind socket to IP", CONFIG_SECTION_WEB, "bind to"); @@ -411,7 +415,7 @@ static void get_netdata_configured_variables() { char buf[HOSTNAME_MAX + 1]; if(gethostname(buf, HOSTNAME_MAX) == -1) - error("WARNING: Cannot get machine hostname."); + error("Cannot get machine hostname."); netdata_configured_hostname = config_get(CONFIG_SECTION_GLOBAL, "hostname", buf); debug(D_OPTIONS, "hostname set to '%s'", netdata_configured_hostname); @@ -614,6 +618,7 @@ int main(int argc, char **argv) { config_set(CONFIG_SECTION_GLOBAL, "run as user", optarg); break; case 'v': + case 'V': printf("%s %s\n", program_name, program_version); return 0; case 'W':