@cryptotaxi247 / netdata-1 / commits / df8a577c9

fix charts.d plugin loading configuration (#16471)

Ilya Mashchenko committed Nov 24, 2023 at 12:44 UTC df8a577c957e453afcadf8bf376049e661a9b9a6
1 file changed +2 -1
collectors/charts.d.plugin/charts.d.plugin.in
+2 -1
@@ -22,6 +22,7 @@ MODULE_NAME="main"
22 # logging
23
24 PROGRAM_NAME="$(basename "${0}")"
25 +SHORT_PROGRAM_NAME="${PROGRAM_NAME/.plugin/}"
26
27 # these should be the same with syslog() priorities
28 NDLP_EMERG=0 # system is unusable
@@ -304,7 +305,7 @@ source "$pluginsd/loopsleepms.sh.inc"
305 # -----------------------------------------------------------------------------
306 # load my configuration
307
307 -for myconfig in "${NETDATA_STOCK_CONFIG_DIR}/${PROGRAM_NAME}.conf" "${NETDATA_USER_CONFIG_DIR}/${PROGRAM_NAME}.conf"; do
308 +for myconfig in "${NETDATA_STOCK_CONFIG_DIR}/${SHORT_PROGRAM_NAME}.conf" "${NETDATA_USER_CONFIG_DIR}/${SHORT_PROGRAM_NAME}.conf"; do
309 if [ -f "$myconfig" ]; then
310 source "$myconfig"
311 if [ $? -ne 0 ]; then