@cryptotaxi247 / netdata-1 / commits / cafe75bb8

respect the plugin directory set in netdata.conf when searching for the tc helper script

Costa Tsaousis committed Jul 25, 2016 at 12:28 UTC cafe75bb8972fa42332eebfebf2b1ac4281200d6
1 file changed +4 -1
src/plugin_tc.c
+4 -1
@@ -672,6 +672,9 @@ void *tc_main(void *ptr) {
672 #endif
673 uint32_t first_hash;
674
675 + snprintfz(buffer, TC_LINE_MAX, "%s/tc-qos-helper.sh", config_get("plugins", "plugins directory", PLUGINS_DIR));
676 + char *tc_script = config_get("plugin:tc", "script to run to get tc values", buffer);
677 +
678 for(;1;) {
679 if(unlikely(netdata_exit)) break;
680
@@ -679,7 +682,7 @@ void *tc_main(void *ptr) {
682 struct tc_device *device = NULL;
683 struct tc_class *class = NULL;
684
682 - 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);
685 + snprintfz(buffer, TC_LINE_MAX, "exec %s %d", tc_script, rrd_update_every);
686 debug(D_TC_LOOP, "executing '%s'", buffer);
687
688 fp = mypopen(buffer, &tc_child_pid);