I have written a unix script using curl that returns the response headers of the http url.However i would like to do the same for https and i am unable to do so.I need these to check if the sites are up and running or not.
My code for http sites
status=$(curl -s --head -w %{http_code} http://10.196.56.112:9081/ -o /dev/null)
echo $status
if [ "$status" == "000" ];
then echo "Server down"
else
echo "Server up"
fi