@cryptotaxi247 / netdata-1 / commits / 294390f3b

feat: disable cloud if `NETDATA_DISABLE_CLOUD` is set to 1 (#13106)

Ilya Mashchenko committed Oct 7, 2022 at 12:33 UTC 294390f3b7514e8e23f3eb840be7eb25de442d6f
1 file changed +6
daemon/main.c
+6
@@ -1282,6 +1282,7 @@ int main(int argc, char **argv) {
1282 }
1283 #endif
1284
1285 +
1286 if(!config_loaded)
1287 {
1288 load_netdata_conf(NULL, 0);
@@ -1289,6 +1290,11 @@ int main(int argc, char **argv) {
1290 load_cloud_conf(0);
1291 }
1292
1293 + char *nd_disable_cloud = getenv("NETDATA_DISABLE_CLOUD");
1294 + if (nd_disable_cloud && !strncmp(nd_disable_cloud, "1", 1)) {
1295 + appconfig_set(&cloud_config, CONFIG_SECTION_GLOBAL, "enabled", "false");
1296 + }
1297 +
1298
1299 // ------------------------------------------------------------------------
1300 // initialize netdata