diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-06-20 21:19:52 +0200 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-06-20 21:19:52 +0200 |
commit | 547b245147b7d44930df46f553067864339f9c43 (patch) | |
tree | 4807a53b1ccb64dc09b0a7af82c35b1c38747748 | |
parent | b3120a4c604d4151c8b778f2f4364518e1e66a95 (diff) | |
download | dbscripts-547b245147b7d44930df46f553067864339f9c43.tar.gz dbscripts-547b245147b7d44930df46f553067864339f9c43.tar.xz |
Corrections to the devlist-mailer script
* Add configurable subject
* Add To: and From: headers
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-x | cron-jobs/devlist-mailer | 11 |
1 files changed, 9 insertions, 2 deletions
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" |