Permalink
Cannot retrieve contributors at this time
Fetching contributors…
| #!/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 | |