File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ 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
66+ sed -i " s|set \$ upstream_app .*|set \$ upstream_app ${CONTAINER} ;|g" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
67+ echo " **** Overriding address as ${CONTAINER} for ${CONTAINER} ****"
6568 fi
6669 if [ -n " ${swag_port} " ]; then
6770 sed -i " s|set \$ upstream_port .*|set \$ upstream_port ${swag_port} ;|g" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
@@ -75,6 +78,9 @@ for CONTAINER in ${AUTO_GEN}; do
7578 SED_swag_url=$( sed -e ' s/[&\\|]/\\&/g; s|$|\\|; $s|\\$||' <<< " ${swag_url}" )
7679 sed -i " s|server_name .*|server_name ${SED_swag_url} ;|" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
7780 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
82+ sed -i " s|server_name .*|server_name ${CONTAINER} .*;|" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
83+ echo " **** Overriding url as ${CONTAINER} .* for ${CONTAINER} ****"
7884 fi
7985 if [ -n " ${swag_server_custom_directive} " ]; then
8086 SED_swag_server_custom_directive=$( sed -e ' s/[&\\|]/\\&/g; s|$|\\|; $s|\\$||' <<< " ${swag_server_custom_directive}" )
You can’t perform that action at this time.
0 commit comments