Remove check for config file in stock conf dir (#12327)
Steve8291 committed
Mar 7, 2022 at 02:08 UTC
54ef00200403e1effdda83dee755a24d27640620
1 file changed
+8
-10
collectors/ioping.plugin/ioping.plugin.in
+8
-10
@@ -174,16 +174,14 @@ ioping_opts="-T 1000000"
174
# -----------------------------------------------------------------------------
175
# load the configuration files
176
177
-for CONFIG in "${NETDATA_STOCK_CONFIG_DIR}/${plugin}.conf" "${NETDATA_USER_CONFIG_DIR}/${plugin}.conf"
178
-do
179
- if [ -f "${CONFIG}" ]
180
- then
181
- info "Loading config file '${CONFIG}'..."
182
- source "${CONFIG}"
183
- [ $? -ne 0 ] && error "Failed to load config file '${CONFIG}'."
184
- else
185
- warning "Cannot find file '${CONFIG}'."
186
- fi
177
+for CONFIG in "${NETDATA_STOCK_CONFIG_DIR}/${plugin}.conf" "${NETDATA_USER_CONFIG_DIR}/${plugin}.conf"; do
178
+ if [ -f "${CONFIG}" ]; then
179
+ info "Loading config file '${CONFIG}'..."
180
+ source "${CONFIG}"
181
+ [ $? -ne 0 ] && error "Failed to load config file '${CONFIG}'."
182
+ elif [[ $CONFIG =~ ^$NETDATA_USER_CONFIG_DIR ]]; then
183
+ warning "Cannot find file '${CONFIG}'."
184
+ fi
185
done
186
187
if [ -z "${destination}" ]