summaryrefslogtreecommitdiffstats
path: root/daemon/main.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-14 19:20:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-14 19:20:33 +0000
commit6cf8f2d5174a53f582e61d715edbb88d6e3367cc (patch)
tree78cec0fd8d09c4a6a052461d42f4b2be3af6d396 /daemon/main.c
parentAdding upstream version 1.39.1. (diff)
downloadnetdata-0ec47d31b6dd5f591027e49c7110a800fc070a86.tar.xz
netdata-0ec47d31b6dd5f591027e49c7110a800fc070a86.zip
Adding upstream version 1.40.0.upstream/1.40.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'daemon/main.c')
-rw-r--r--daemon/main.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/daemon/main.c b/daemon/main.c
index 606de128b..cff6530f3 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -170,6 +170,8 @@ static void service_to_buffer(BUFFER *wb, SERVICE_TYPE service) {
buffer_strcat(wb, "ANALYTICS ");
if(service & SERVICE_EXPORTERS)
buffer_strcat(wb, "EXPORTERS ");
+ if(service & SERVICE_HTTPD)
+ buffer_strcat(wb, "HTTPD ");
}
static bool service_wait_exit(SERVICE_TYPE service, usec_t timeout_ut) {
@@ -365,6 +367,7 @@ void netdata_cleanup_and_exit(int ret) {
| SERVICE_EXPORTERS
| SERVICE_HEALTH
| SERVICE_WEB_SERVER
+ | SERVICE_HTTPD
, 3 * USEC_PER_SEC);
delta_shutdown_time("stop collectors and streaming threads");
@@ -479,7 +482,7 @@ void netdata_cleanup_and_exit(int ret) {
#ifdef ENABLE_HTTPS
delta_shutdown_time("free openssl structures");
- security_clean_openssl();
+ netdata_ssl_cleanup();
#endif
delta_shutdown_time("remove incomplete shutdown file");
@@ -573,8 +576,6 @@ void web_server_config_options(void)
web_allow_mgmt_dns =
make_dns_decision(CONFIG_SECTION_WEB, "allow management by dns","heuristic",web_allow_mgmt_from);
-
-#ifdef NETDATA_WITH_ZLIB
web_enable_gzip = config_get_boolean(CONFIG_SECTION_WEB, "enable gzip compression", web_enable_gzip);
char *s = config_get(CONFIG_SECTION_WEB, "gzip compression strategy", "default");
@@ -602,7 +603,6 @@ void web_server_config_options(void)
error("Invalid compression level %d. Valid levels are 1 (fastest) to 9 (best ratio). Proceeding with level 9 (best compression).", web_gzip_level);
web_gzip_level = 9;
}
-#endif /* NETDATA_WITH_ZLIB */
}
@@ -834,7 +834,7 @@ static void security_init(){
tls_version = config_get(CONFIG_SECTION_WEB, "tls version", "1.3");
tls_ciphers = config_get(CONFIG_SECTION_WEB, "tls ciphers", "none");
- security_openssl_library();
+ netdata_ssl_initialize_openssl();
}
#endif
@@ -1979,6 +1979,14 @@ int main(int argc, char **argv) {
if(web_server_mode != WEB_SERVER_MODE_NONE)
api_listen_sockets_setup();
+
+#ifdef ENABLE_HTTPD
+ delta_startup_time("initialize httpd server");
+ for (int i = 0; static_threads[i].name; i++) {
+ if (static_threads[i].start_routine == httpd_main)
+ static_threads[i].enabled = httpd_is_enabled();
+ }
+#endif
}
delta_startup_time("set resource limits");