[DBS-1882] include redis.conf

This commit is contained in:
Michael Boelen 2017-03-09 12:28:05 +01:00
parent 336dcb4811
commit bb83598ff1
1 changed files with 25 additions and 23 deletions

View File

@ -257,12 +257,18 @@
Register --test-no DBS-1882 --weight L --network NO --preqs-met "${PREQS_MET}" --skip-reason "${SKIPREASON}" --category security --description "Redis configuration file"
if [ ${SKIPTEST} -eq 0 ]; then
PATHS="${ROOTDIR}etc/redis ${ROOTDIR}usr/local/etc/redis"
ALLFILES=$(${LSBINARY} ${ROOTDIR}etc/redis.conf 2> /dev/null)
FOUND=0
for DIR in ${PATHS}; do
LogText "Action: scanning directory (${DIR}) for Redis configuration files"
FILES=$(${LSBINARY} ${DIR}/*.conf 2> /dev/null)
if [ ! -z "${FILES}" ]; then
for CONFFILE in ${FILES}; do
ALLFILES="${ALLFILES} ${FILES}"
else
LogText "Result: no configuration files found in this directory"
fi
done
for CONFFILE in ${ALLFILES}; do
if FileIsReadable ${CONFFILE}; then
LogText "Action: checking if ${CONFFILE} is a Sentinel configuration file"
# Exclude Sentinel configuration file
@ -284,10 +290,6 @@
LogText "Could not read this file, so skipping it"
fi
done
else
LogText "Result: no configuration files found in this directory"
fi
done
# Sort the list of discovered configuration files so we can make them unique
REDIS_CONFIGURATION_FILES=$(echo ${REDIS_CONFIGURATION_FILES} | ${SEDBINARY} 's/^ //' | ${TRBINARY} ' ' '\n' | ${SORTBINARY} | ${UNIQBINARY} | ${TRBINARY} '\n' ' ')
for FILE in ${REDIS_CONFIGURATION_FILES}; do