From ff98264bfcafc7ae8ccd878a0c5c3f4361a4d9ee Mon Sep 17 00:00:00 2001 From: Michael Schmid Date: Fri, 6 Apr 2018 21:54:59 -0500 Subject: [PATCH] only ep folders that are not empty --- images/nginx/docker-entrypoint | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/images/nginx/docker-entrypoint b/images/nginx/docker-entrypoint index b9ef9c2583..fdef58a447 100755 --- a/images/nginx/docker-entrypoint +++ b/images/nginx/docker-entrypoint @@ -12,7 +12,11 @@ if [ ! "${BASIC_AUTH}" == "off" ]; then fi ep /etc/nginx/* -find /etc/nginx/conf.d/ -type d | while read DIR ; - do ep $DIR/*; +# find all folders within /etc/nginx/conf.d/ +find /etc/nginx/conf.d/ -type d | while read DIR; do + # envplate if found folder is not empty + if find $DIR -mindepth 1 | read; then + ep $DIR/*; + fi done ep /etc/nginx/helpers/*