Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 33 lines (20 sloc) 622 Bytes
#!/bin/bash
export PATH=/usr/bin:/bin
cd $PEGASUS_SUBMIT_DIR
# use a temp file for the message body
TMPFILE=`mktemp -t pegasus-notification.XXXXXXXXXX` || exit 1
cat >>$TMPFILE <<EOF
The following workflow issued an event: $PEGASUS_EVENT
$PEGASUS_SUBMIT_DIR
Below is output from pegasus-status:
EOF
pegasus-status -v >>$TMPFILE 2>&1
echo >>$TMPFILE
EXTRA_ARGS=""
# grab the email from .forward for now
if [ -e ~/.forward ]; then
for DEST in `cat ~/.forward | grep "@"`; do
cat $TMPFILE | mailx -s "Workflow event: $PEGASUS_EVENT $PEGASUS_SUBMIT_DIR" $EXTRA_ARGS $DEST
done
fi
rm -f $TMPFILE