#!/bin/sh

date=`date "+%Y/%m/%d" -d "-1 days"`

output=`grep "${date}" /home/wnteapnw/public_html/mary-love-data/logs/error* | grep "ERROR"`

if [ -n "$output" ]; then
	export LC_CTYPE=ja_JP.UTF-8;
	echo "${output}" | mail -s '[MARY] error' -r alert@mary-love.com maruoka@marushinweb.jp
#	echo "${output}" | mail -s '[MARY] error' -r alert@mary-love.com kiys.ais@gmail.com
fi
