Checking whether all the not running proxies successfuly restarted.
This commit is contained in:
@@ -111,14 +111,24 @@ elif [[ "$RUNNING_CONTAINERS" -eq 1 ]] ; then
|
|||||||
else
|
else
|
||||||
echo "$proxies starting was unsuccesful";
|
echo "$proxies starting was unsuccesful";
|
||||||
fi
|
fi
|
||||||
# At last need to restart the only one running proxy when the others started successful.
|
|
||||||
else
|
else
|
||||||
ONLY_RUNNING_PROXY_NAME=$proxies;
|
ONLY_RUNNING_PROXY_NAME=$proxies;
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
echo "Only running proxy name="$ONLY_RUNNING_PROXY_NAME;
|
|
||||||
|
# At last need to restart the only one running proxy when the others started successful.
|
||||||
|
for CHECK_PROXIES in $CONTAINERS ; do
|
||||||
|
if [[ $CHECK_PROXIES != $ONLY_RUNNING_PROXY_NAME ]] ; then
|
||||||
|
if docker ps | grep $CHECK_PROXIES ; then
|
||||||
|
echo "Not running proxies successfuly started, let's start the only running one.";
|
||||||
|
#do_proxy_restart $ONLY_RUNNING_PROXY_NAME;
|
||||||
|
else
|
||||||
|
echo "Not enough running proxies found, can't start the only running one.";
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
else
|
else
|
||||||
sleep $TIMEOUT;
|
sleep $TIMEOUT;
|
||||||
|
Reference in New Issue
Block a user