diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2006-09-25 15:39:05 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2006-09-25 15:39:05 +0000 |
commit | 948a2213a86768f0f1184496a31a7f08058b8e4f (patch) | |
tree | 0f0a1f1265df18595015af857cf7475058382c7c /scripts | |
parent | 7a5fc7713baf267008b5b9f998705f5af51fec46 (diff) |
redirected email to pd-cvs; made this script run as the 'pd' user
svn path=/trunk/; revision=6025
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/auto-build/run-automated-builder | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/auto-build/run-automated-builder b/scripts/auto-build/run-automated-builder index f913f560..0e15c9db 100755 --- a/scripts/auto-build/run-automated-builder +++ b/scripts/auto-build/run-automated-builder @@ -1,11 +1,13 @@ #!/bin/sh -HOSTNAME=`hostname` +HOSTNAME=`hostname | sed 's|\([a-zA-Z0-9-]\)\..*|\1|'` SYSTEM=`uname -s` DATE=`date +%Y-%m-%d` TIME=`date +%H.%M.%S` SCRIPT=`echo $0| sed 's|.*/\(.*\)|\1|g'` +RECIPIENT=pd-cvs@iem.at + run_build_script () { distro=$1 @@ -13,15 +15,15 @@ run_build_script () LOGFILE=/home/pd/logs/${DATE}_${TIME}_${SYSTEM}_${HOSTNAME}_${distro}_${SCRIPT}.txt touch ${LOGFILE} - su pd -c "sh /home/pd/auto-build/${distro}/scripts/auto-build/${distro}-auto-builder.sh" >> $LOGFILE 2>&1 + sh /home/pd/auto-build/${distro}/scripts/auto-build/${distro}-auto-builder.sh >> $LOGFILE 2>&1 rsync -a ${LOGFILE} rsync://128.238.56.50/upload/${DATE}/logs/ # send status report if something failed completion_test=`tail -1 ${LOGFILE}` if [ "x${completion_test}" != "xSUCCESS" ]; then - SUBJECT="$HOSTNAME Pd-$SYSTEM $distro build results $DATE $TIME" - tail -200 ${LOGFILE} | mail -s "${SUBJECT}" hans@eds.org + SUBJECT="autobuild: $distro $HOSTNAME $DATE $TIME" + tail -200 ${LOGFILE} | mail -s "${SUBJECT}" ${RECIPIENT} fi } |