[sysadmin-bin] if statement modified: check if new_foundation_member has content and eventually process it, otherwi
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] if statement modified: check if new_foundation_member has content and eventually process it, otherwi
- Date: Mon, 20 Feb 2012 12:09:05 +0000 (UTC)
commit d27932bd1fc428e1909efa4b752f740ab96c51d4
Author: Andrea Veri <av src gnome org>
Date: Mon Feb 20 13:08:52 2012 +0100
if statement modified: check if new_foundation_member has content and eventually process it, otherwise exit.
mail/automatic_subscriptions | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/mail/automatic_subscriptions b/mail/automatic_subscriptions
index fe1f775..4eb40a7 100755
--- a/mail/automatic_subscriptions
+++ b/mail/automatic_subscriptions
@@ -8,13 +8,13 @@ QUERY='SELECT email from foundationmembers WHERE TO_DAYS(first_added)=To_DAYS(NO
mysql -N -r -h button-back --user=anonvoting --password=password -e "$QUERY" foundation > $WORKDIR/new_foundation_members
-if [ -f "${WORKDIR}/new_foundation_members" ]; then
+if [ -s "${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"
+ echo "No new members to subscribe at the moment. Exiting. \n"
exit 1
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]