File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ for CONTAINER in ${AUTO_GEN}; do
6262 if [ -n " ${swag_address} " ]; then
6363 sed -i " s|set \$ upstream_app .*|set \$ upstream_app ${swag_address} ;|g" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
6464 echo " **** Overriding address as ${swag_address} for ${CONTAINER} ****"
65- elif [ -n " ${swag_preset_conf} " ] && [ -f " /config/nginx/proxy-confs/${swag_preset_conf} .subdomain.conf.sample" ]; then
65+ elif [ ! -f " /config/nginx/proxy-confs/ ${CONTAINER} .subdomain.conf.sample " ] && [ -n " ${swag_preset_conf} " ] && [ -f " /config/nginx/proxy-confs/${swag_preset_conf} .subdomain.conf.sample" ]; then
6666 sed -i " s|set \$ upstream_app .*|set \$ upstream_app ${CONTAINER} ;|g" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
6767 echo " **** Overriding address as ${CONTAINER} for ${CONTAINER} ****"
6868 fi
@@ -78,7 +78,7 @@ for CONTAINER in ${AUTO_GEN}; do
7878 SED_swag_url=$( sed -e ' s/[&\\|]/\\&/g; s|$|\\|; $s|\\$||' <<< " ${swag_url}" )
7979 sed -i " s|server_name .*|server_name ${SED_swag_url} ;|" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
8080 echo " **** Overriding url as ${swag_url} for ${CONTAINER} ****"
81- elif [ -n " ${swag_preset_conf} " ] && [ -f " /config/nginx/proxy-confs/${swag_preset_conf} .subdomain.conf.sample" ]; then
81+ elif [ ! -f " /config/nginx/proxy-confs/ ${CONTAINER} .subdomain.conf.sample " ] && [ -n " ${swag_preset_conf} " ] && [ -f " /config/nginx/proxy-confs/${swag_preset_conf} .subdomain.conf.sample" ]; then
8282 sed -i " s|server_name .*|server_name ${CONTAINER} .*;|" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
8383 echo " **** Overriding url as ${CONTAINER} .* for ${CONTAINER} ****"
8484 fi
You can’t perform that action at this time.
0 commit comments