#!/bin/sh

status=$(curl -Is -l ${1} | head -n 1 | grep -i http/ | awk {'print $2'} | grep -E '2[0-9]{2}|3[0-9]{2}')

if [ "${status}" ]; then
    echo "Status check Success - Behind RH VPN"
else
    echo "Status check Failed - Public network"
fi
