[sysadmin-bin] grab password from /home/admin/secret/anonvoting



commit 3afebe66744bd409a590706cf491cc5b8ba7e067
Author: Olav Vitters <olav vitters nl>
Date:   Thu Mar 15 13:34:14 2012 +0100

    grab password from /home/admin/secret/anonvoting

 mail/automatic_subscriptions |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/mail/automatic_subscriptions b/mail/automatic_subscriptions
index 397ebcd..766f791 100755
--- a/mail/automatic_subscriptions
+++ b/mail/automatic_subscriptions
@@ -4,8 +4,9 @@
 
 WORKDIR="/var/cache"
 QUERY='SELECT email from foundationmembers WHERE TO_DAYS(last_renewed_on)=To_DAYS(NOW()); SELECT email from foundationmembers WHERE TO_DAYS(first_added)=To_DAYS(NOW())'
+PASSWORD="`grep mysql_password /home/admin/secret/anonvoting | sed -r 's/^[^"]+"//;s/"[^#]+//'`"
 
-mysql -N -r -h button-back --user=anonvoting --password=password -e "$QUERY" foundation > $WORKDIR/new_foundation_members
+mysql -N -r -h button-back --user=anonvoting --password="$PASSWORD" -e "$QUERY" foundation > $WORKDIR/new_foundation_members
 
 if [ -s "${WORKDIR}/new_foundation_members" ]; then
     cd $WORKDIR



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]