#!/bin/bash

host=$1
file=$2
text=$3
SERVERIP=$host
NOTIFYEMAIL=test@example.com

ping -c 3 $SERVERIP > /dev/null 2>&1
if [ $? -ne 0 ]
then
   # Use your favorite mailer here:
   #mailx -s "Server $SERVERIP is down" -t "$NOTIFYEMAIL" < /dev/null 
   echo $1
   echo $2
   echo $3
   #/usr/bin/ambestream -v  -t "${3}" -4 -my KD8TUZ  -d 127.0.0.1 -bi 7500 -bl 1000  -p 40000 KD8TUZ B /root/systemissues/$2.dvtool
   /usr/local/bin/voicetransmit KD8TUZ_B /root/systemissues/$2.dvtool

fi

exit 0
