From 547b245147b7d44930df46f553067864339f9c43 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 20 Jun 2008 15:19:52 -0400 Subject: Corrections to the devlist-mailer script * Add configurable subject * Add To: and From: headers Signed-off-by: Aaron Griffin --- cron-jobs/devlist-mailer | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'cron-jobs') diff --git a/cron-jobs/devlist-mailer b/cron-jobs/devlist-mailer index 094d60d..b24d530 100755 --- a/cron-jobs/devlist-mailer +++ b/cron-jobs/devlist-mailer @@ -4,13 +4,20 @@ LIST="arch-dev-public@archlinux.org" #LIST="aaronmgriffin@gmail.com" -FROM="repomaint" +FROM="repomaint@archlinux.org" + +SUBJECT="Repository Maintenance $(date +"%d-%m-%Y %H:%M")" +if [ $# -eq 1 ]; then + SUBJECT="$1" +fi stdin="$(cat)" #echo used to strip whitespace for checking for actual data if [ -n "$(echo $stdin)" ]; then -echo "Subject: Repository Maintenance $(date +"%d-%m-%Y %H:%M") +echo "Subject: $SUBJECT +To: $LIST +From: $FROM $stdin" | /usr/sbin/sendmail -F$FROM "$LIST" -- cgit v1.2.3-24-g4f1b