From b2af23e6a4f7eed263dd2e63a5c2e5ced77277c0 Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Fri, 22 May 2026 15:14:40 +0100 Subject: [PATCH] CC Urchlay on sbosrcarch emails. --- sbosrcarch-wrapper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbosrcarch-wrapper b/sbosrcarch-wrapper index ac0d79e..cb37760 100755 --- a/sbosrcarch-wrapper +++ b/sbosrcarch-wrapper @@ -8,11 +8,12 @@ LOGFILE="$(printf "%(%Y%m%d-%H%M%S)T")-$$" # Where from/to to send emails. Comment for no emailing. EMAIL_FROM="\"Server: ${HOSTNAME%%.*}\" " EMAIL_TO=("Systems' Administrator ") +EMAIL_CC=("Urchlay ") # Functions notify() { [[ -n "$EMAIL_FROM" ]] && (( "${#EMAIL_TO[@]}" != 0 )) && { - printf "%s: %s\\n%s: %s\\n%s:\\n%s\\n" "Exit code" "$ERR" "Logfile" "$LOGSDIR/$LOGFILE.xz" "Output" "$(<"$LOGSDIR/$LOGFILE")" | mail -r "$EMAIL_FROM" -s "SboSrcArch $1" "${EMAIL_TO[@]}" >/dev/null 2>&1 || { + printf "%s: %s\\n%s: %s\\n%s:\\n%s\\n" "Exit code" "$ERR" "Logfile" "$LOGSDIR/$LOGFILE.xz" "Output" "$(<"$LOGSDIR/$LOGFILE")" | mail -r "$EMAIL_FROM" -s "SboSrcArch $1" "$(for i in $(seq -s ' ' 0 $(( ${#EMAIL_CC[@]} -1 ))); do echo ${EMAIL_CC[$i]:+-c "${EMAIL_CC[$i]}"}; done)" "${EMAIL_TO[@]}" >/dev/null 2>&1 || { printf "%s: %s\\n" "${0##*/}" "mail command failed" >&2 return 1 }