ngxproxy: verify domain validity

This commit is contained in:
Wonderfall 2016-05-30 12:55:55 +02:00
parent a803fc3ee8
commit eb5e709797

View File

@ -11,13 +11,18 @@ done
while [ "$DOMAIN" == "" ]; do while [ "$DOMAIN" == "" ]; do
read -p "Domain: " DOMAIN read -p "Domain: " DOMAIN
if [ "$(dig +short ${DOMAIN})" == "" ]; then
echo "WARNING: ${DOMAIN} couldn't be resolved. It may not work!"
echo "HINT: Is this domain correct? Did you update your DNS zone?"
fi
done done
while [ "$CONTAINER" == "" ]; do while [ "$CONTAINER" == "" ]; do
read -p "Container: " CONTAINER read -p "Container: " CONTAINER
ping -c 1 ${CONTAINER} >/dev/null 2>&1 ping -c 1 ${CONTAINER} >/dev/null 2>&1
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
echo "WARNING: ${CONTAINER} seems to be unavailable." echo "WARNING: ${CONTAINER} seems to be unavailable. It may not work!"
echo "HINT: Did you correctly link the container?"
fi fi
done done