summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-06-20 21:19:52 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2008-06-20 21:19:52 +0200
commit547b245147b7d44930df46f553067864339f9c43 (patch)
tree4807a53b1ccb64dc09b0a7af82c35b1c38747748
parentb3120a4c604d4151c8b778f2f4364518e1e66a95 (diff)
downloaddbscripts-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-xcron-jobs/devlist-mailer11
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"