if [ $? -ne 0 ];then
RETVAL=1
NowTime=`date +"%m-%d %H:%M:%S"`
SUBJECT="${1} is bad"
SUBJECT_CONTENT="http://${1} service is error,${NowTime}."
for MAIL_USER in $MAIL_GROUP
do
echo "send to :$MAIL_USER Title:$SUBJECT_CONTENT" > $LOG_FILE
mail -s "$SUBJECT" $MAIL_USER <$LOG_FILE
done
else
RETVAL=0
fi
return $RETVAL
}