From 1d6c4485993037294fe1f5813c9678adecda5a8c Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Wed, 29 Jan 2020 05:20:35 +0100 Subject: [PATCH] mail_wrap_script.sh: add error code to mail output --- mail_wrap_script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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