Permalink
Browse files

Change e-mail subject, so we can at a glance see result of snapshot /…

… replication
  • Loading branch information...
1 parent 35e8a26 commit ac48c86c43b2dac87eafa31fc99f38f911b4e208 @kmoore134 kmoore134 committed Aug 13, 2013
@@ -141,7 +141,7 @@ echo_log() {
# 2 = Message
email_msg() {
if [ -z "$EMAILADDY" ] ; then return ; fi
- echo -e "$2" | mail -s "Life-Preserver `hostname`: $1" $EMAILADDY
+ echo -e "$2" | mail -s "$1 - `hostname`" $EMAILADDY
}
queue_msg() {
@@ -29,9 +29,9 @@ else
fi
case $EMAILMODE in
- ALL) email_msg "Automated Replication - $title" "`echo_queue_msg`" ;;
+ ALL) email_msg "$title - Automated Replication" "`echo_queue_msg`" ;;
*) if [ $status -ne 0 ] ; then
- email_msg "Automated Replication - $title" "`echo_queue_msg`"
+ email_msg "$title - Automated Replication" "`echo_queue_msg`"
fi
;;
esac
@@ -64,12 +64,12 @@ done
# If we failed at any point, sent out a notice
if [ $snapStat -ne 0 ] ; then
- email_msg "Automated Snapshot - FAILED" "`echo_queue_msg`"
+ email_msg "FAILED - Automated Snapshot" "`echo_queue_msg`"
fi
# If we are successful and user wants all notifications, send out a message
if [ $snapStat -eq 0 -a "$EMAILMODE" = "ALL" ] ; then
- email_msg "Automated Snapshot - Success" "`echo_queue_msg`"
+ email_msg "Success - Automated Snapshot" "`echo_queue_msg`"
fi
# Check if we need to run a replication task for this dataset

0 comments on commit ac48c86

Please sign in to comment.