diff --git a/bootstrap.sh b/bootstrap.sh index 4ef550d..be180b5 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -26,8 +26,9 @@ function warn function validate_host { - echo "$1" | grep -P '^(http|https):\/\/(([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])(:[0-9]+)?$' + echo "$1" | grep -P '^(http|https):\/\/(([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])(:[0-9]+)?$' > /dev/null 2>&1 if [ $? -eq 0 ]; then + debug "Checking host is resolvable: $1" curl $1 > /dev/null 2>&1 fi return $?