#! /bin/sh # Copyright 2001,2,3,8 Martin Schulze # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from='Debian Webmaster ' mailto=webwml-monitor@www-master.debian.org xloop=debian-www@lists.debian.org regexp='\(Break\|ignored\|Error\|ERROR\)' . `dirname $0`/../common.sh logfile=${webtopdir}/cron/log/wml_run.log if grep -q "$regexp" $logfile then ( echo "From: $from" echo "To: $mailto" echo "X-Loop: $xloop" echo "Subject: webwml failed" echo grep -A 4 -B 15 "$regexp" $logfile ) | /usr/sbin/sendmail -t fi # DDP build logs mailto=ddp-build@lists.alioth.debian.org mailto=debian-doc@lists.debian.org logfile="${webtopdir}/release-notes/build.log ${webtopdir}/ddp-svn/make.log" regexp='\(Break\|Error\|ERROR\)' if grep -q "$regexp" $logfile then ( echo "From: $from" echo "To: $mailto" echo "X-Loop: $xloop" echo "Subject: ddp build failed" echo grep -A 4 -B 15 "$regexp" $logfile ) | /usr/sbin/sendmail -t fi