From cafe75bb8972fa42332eebfebf2b1ac4281200d6 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Mon, 25 Jul 2016 12:28:39 +0300 Subject: [PATCH] respect the plugin directory set in netdata.conf when searching for the tc helper script --- src/plugin_tc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugin_tc.c b/src/plugin_tc.c index 46c85954..251cfeeb 100644 --- a/src/plugin_tc.c +++ b/src/plugin_tc.c @@ -672,6 +672,9 @@ void *tc_main(void *ptr) { #endif uint32_t first_hash; + snprintfz(buffer, TC_LINE_MAX, "%s/tc-qos-helper.sh", config_get("plugins", "plugins directory", PLUGINS_DIR)); + char *tc_script = config_get("plugin:tc", "script to run to get tc values", buffer); + for(;1;) { if(unlikely(netdata_exit)) break; @@ -679,7 +682,7 @@ void *tc_main(void *ptr) { struct tc_device *device = NULL; struct tc_class *class = NULL; - snprintfz(buffer, TC_LINE_MAX, "exec %s %d", config_get("plugin:tc", "script to run to get tc values", PLUGINS_DIR "/tc-qos-helper.sh"), rrd_update_every); + snprintfz(buffer, TC_LINE_MAX, "exec %s %d", tc_script, rrd_update_every); debug(D_TC_LOOP, "executing '%s'", buffer); fp = mypopen(buffer, &tc_child_pid); -- 2.39.2