[sysadmin-bin] Automatically subscribe new Foundation members to foundation-list and foundation-announce.
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Automatically subscribe new Foundation members to foundation-list and foundation-announce.
- Date: Mon, 20 Feb 2012 11:36:15 +0000 (UTC)
commit c5fedfbe09ddcb55f5439c7b97b225e827a7a256
Author: Andrea Veri <av src gnome org>
Date: Mon Feb 20 12:36:40 2012 +0100
Automatically subscribe new Foundation members to foundation-list and foundation-announce.
mail/automatic_subscriptions | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/mail/automatic_subscriptions b/mail/automatic_subscriptions
new file mode 100755
index 0000000..521ef8e
--- /dev/null
+++ b/mail/automatic_subscriptions
@@ -0,0 +1,20 @@
+# This script will periodically check the foundation_db and automatically
+# subscribe new Foundation members to the relevant mailing lists. (foundation-list
+# and foundation-announce)
+# Author: Andrea Veri <av gnome org>
+
+WORKDIR="/var/cache"
+QUERY='SELECT email from foundationmembers WHERE TO_DAYS(first_added)=To_DAYS(NOW())-3;'
+
+mysql -N -r -h button-back --user=anonvoting --password=password -e "$QUERY" foundation > $WORKDIR/new_foundation_members
+
+if [ -f "${WORKDIR}/new_foundation_members" ]; then
+ cd $WORKDIR
+ /usr/lib/mailman/bin/add_members -a n -r new_foundation_members foundation-list
+ /usr/lib/mailman/bin/add_members -a n -r new_foundation_members foundation-announce
+ rm -rf $WORKDIR/new_foundation_members
+else
+ echo "The file you were searching for isn't there. Failing. \n"
+ exit 1
+fi
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]