Check how many APP_IP presents when examine IP addresses

This commit is contained in:
2023-02-13 11:29:16 +00:00
parent 6a9433934e
commit b490bf606a

View File

@@ -110,7 +110,11 @@ name_resolver() {
for D_IP in `echo $UP` ;
do
DNS_IP=$(docker inspect $D_IP -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}');
if [ "$APP_IP" == "" ]; then
APP_IP=$DNS_IP;
else
APP_IP="$APP_IP $DNS_IP";
fi;
echo "APP_IP: "$APP_IP;
done
else
@@ -242,12 +246,12 @@ if [ "$SMARTHOST_PROXY_PATH" != "" ]; then
#Create public proxy domain file
if [ -n "$LOCATION" ]; then
LOCATION_LINE=',
"ALTERNATE_LOCATION_PATH": {
"ALTERNATE_LOCATION_PATH": [ {
"LOCAL_PATH": "'$LOCATION'",
"LOCAL_NAME": "'$TARGET_IP'",
"LOCAL_PORT": "'$PORT'",
"LOCAL_ALLOWED_NETWORK": ""
}
} ]
';
else
LOCATION_LINE=',"'$LOCAL_NAME'": "'$TARGET_IP'"';