Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Change e-mail subject, so we can at a glance see result of snapshot /…
Browse files Browse the repository at this point in the history
… replication
  • Loading branch information
Kris Moore committed Aug 13, 2013
1 parent 35e8a26 commit ac48c86
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src-sh/lpreserver/backend/functions.sh
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src-sh/lpreserver/backend/runrep.sh
Expand Up @@ -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
4 changes: 2 additions & 2 deletions src-sh/lpreserver/backend/runsnap.sh
Expand Up @@ -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
Expand Down

0 comments on commit ac48c86

Please sign in to comment.