Merge pull request #973 from igloonet/fix/functions-parse-nginx-abs-path

Support absolute paths in nginx includes and fix ls warning on empty directories
This commit is contained in:
Michael Boelen 2020-10-20 13:38:08 +02:00 committed by GitHub
commit 92df49d08e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2305,7 +2305,8 @@
# Check for additional config files included as follows
# "include sites-enabled/*.conf"
elif [ $(echo ${VALUE} | grep -F -c "*.conf") -gt 0 ]; then
for FOUND_CONF in $(ls ${CONFIG_FILE%nginx.conf}${VALUE%;*}); do
if [ "$(echo ${VALUE} | ${CUTBINARY} -c1)" != "/" ]; then VALUE=${CONFIG_FILE%nginx.conf}; fi
for FOUND_CONF in $(ls ${VALUE%;*} 2> /dev/null); do
FOUND=0
for CONF in ${NGINX_CONF_FILES}; do
if [ "${CONF}" = "${FOUND_CONF}" ]; then FOUND=1; LogText "Found this file already in our configuration files array, not adding to queue"; fi