Added inline log for warning email.

This commit is contained in:
deajan 2014-07-08 02:14:03 +02:00
parent d783df70f4
commit b7123eb335
1 changed files with 2 additions and 1 deletions

View File

@ -208,7 +208,8 @@ function SendAlert
return 0
fi
cat "$LOG_FILE" | gzip -9 > $RUN_DIR/osync_lastlog.gz
if type -p mutt > /dev/null 2>&1
MAIL_ALERT_MSG=$MAIL_ALERT_MSG$'\n\n'$(tail -n 25 "$LOG_FILE")
if type -p mutt > /dev/null 2>&1
then
echo $MAIL_ALERT_MSG | $(type -p mutt) -x -s "Sync alert for $SYNC_ID" $DESTINATION_MAILS -a $RUN_DIR/osync_lastlog.gz
if [ $? != 0 ]