set -x
var=$(mysql -e "SELECT count(*) FROM information_schema.PROCESSLIST;")
vaar=7500
con="${var//count(*)}"
echo "$con"
if [ $con -gt $vaar ]
then
   echo "Subject: Max user connections is reached in Glotrax! trying undeploy and deploy" | /usr/sbin/sendmail "support@glovision.co";
   cd /usr/local/gts
   bin/undeploycron.sh
   bin/deploycron.sh
else
echo "mysql max users are fine"
fi
