From 9ab1691c0a2ad2c5be64955fae7811b8badee349 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Wed, 3 Sep 2014 15:17:41 +0300 Subject: [PATCH] anduril finished mailer --- anduril/anduril-vm-mail | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 anduril/anduril-vm-mail diff --git a/anduril/anduril-vm-mail b/anduril/anduril-vm-mail new file mode 100755 index 0000000..ec7dff9 --- /dev/null +++ b/anduril/anduril-vm-mail @@ -0,0 +1,21 @@ +#!/bin/bash + + +( + echo 'Subject: Execution finished! '$NETWORK_TO_RUN' + ' + echo "Pipeline: $CLEANER_TITLE" + echo -n "Started in: " + pwd + echo "Host: $HOSTNAME" + echo "Execution folder: $RESULTS_IN" + echo "Log folder: $LOG_IN" + [ -f "$LOG_IN"/_global ] && { + echo "===== Log tail =====" + head -n 1 "$LOG_IN"/_global + tail -n 20 "$LOG_IN"/_global + + } + + ) | sendmail -r$USER@mappi.helsinki.fi $USER@mappi.helsinki.fi & +