logmngr: Fix shadow variable names in lib

This commit is contained in:
Husaam Mehdi 2025-06-12 09:04:46 +00:00 committed by IOPSYS Dev
parent 93b1952f50
commit 5b090176a1
No known key found for this signature in database

View file

@ -5,7 +5,7 @@
CONF_FILE=/etc/fluent-bit/fluent-bit.conf CONF_FILE=/etc/fluent-bit/fluent-bit.conf
TMP_CONF_FILE=/tmp/fluent-bit/fluent-bit.conf TMP_CONF_FILE=/tmp/fluent-bit/fluent-bit.conf
CONF_DIR=/etc/fluent-bit/conf.d FLUENT_BIT_CONF_DIR=/etc/fluent-bit/conf.d
append_conf() { append_conf() {
echo "$*" >> ${TMP_CONF_FILE} echo "$*" >> ${TMP_CONF_FILE}
@ -15,12 +15,12 @@ create_config_file() {
mkdir -p /tmp/fluent-bit mkdir -p /tmp/fluent-bit
rm -f ${TMP_CONF_FILE} rm -f ${TMP_CONF_FILE}
touch ${TMP_CONF_FILE} touch ${TMP_CONF_FILE}
# include all files placed in CONF_DIR directory # include all files placed in FLUENT_BIT_CONF_DIR directory
# fluent-bit does not support using directory in include directive # fluent-bit does not support using directory in include directive
# also, if no file is found then fluent-bit aborts # also, if no file is found then fluent-bit aborts
# so only add include if any file is present in the CONF_DIR # so only add include if any file is present in the FLUENT_BIT_CONF_DIR
if [ -d "$CONF_DIR" ] && [ "$(ls -A "$CONF_DIR")" ]; then if [ -d "$FLUENT_BIT_CONF_DIR" ] && [ "$(ls -A "$FLUENT_BIT_CONF_DIR")" ]; then
echo "@INCLUDE ${CONF_DIR}/*" >> ${TMP_CONF_FILE} echo "@INCLUDE ${FLUENT_BIT_CONF_DIR}/*" >> ${TMP_CONF_FILE}
fi fi
echo "" >> ${TMP_CONF_FILE} echo "" >> ${TMP_CONF_FILE}
} }