#!/bin/bash

time_val=`curl -w "\n%{time_total}\n" -o /dev/null --location --request GET  "https://www.aspireias.com"`

if [ "$(echo $time_val | cut -d. -f1)" -gt "1" ]; then
#	echo "Time to retrieve data is" $time_val | mail -s "AspireIAS time taken" divya@cliffsupport.com,rooshi@cliffsupport.com
	echo "Time taken to retrieve data is" $time_val;
	exit 2;
else
	echo "Time taken to retrieve data is normal";
	exit 0;
fi
