diff --git a/mail_wrap_script.sh b/mail_wrap_script.sh index 09aa395..c5a1356 100755 --- a/mail_wrap_script.sh +++ b/mail_wrap_script.sh @@ -18,7 +18,7 @@ rm /tmp/$FILE_ID.log if [ $ERR -ne 0 ]; then MAILTO=$(cat "$HOME/.admin_mail") echo "Sending error mail" - echo -e "An error occured during the execution of $SCRIPT.\n\n$OUTPUT" | mailx -s "$(hostname) $SCRIPT failure" "$MAILTO" + echo -e "An error occured during the execution of $SCRIPT ($ERR).\n\n$OUTPUT" | mailx -s "$(hostname) $SCRIPT failure" "$MAILTO" echo "Sent" exit 1 fi