[evolvis-commits] r6679: backend for quick mailing list subscriptions↵
Thorsten Glaser
t.glaser at tarent.de
Wed Jun 2 16:42:46 CEST 2010
Author: Thorsten Glaser <t.glaser at tarent.de>
Date: 2010-06-02 16:42:46 +0200 (Wed, 02 Jun 2010)
New Revision: 6679
Added:
trunk/gforge_base/evolvisforge/gforge/cronjobs/mm_quicksubscribe.sh
Modified:
trunk/gforge_base/evolvisforge/gforge/cron.d/lists-mailman
trunk/gforge_base/evolvisforge/gforge/install/lists-mailman
Log:
backend for quick mailing list subscriptions
Modified: trunk/gforge_base/evolvisforge/gforge/cron.d/lists-mailman
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/cron.d/lists-mailman 2010-06-02 14:42:43 UTC (rev 6678)
+++ trunk/gforge_base/evolvisforge/gforge/cron.d/lists-mailman 2010-06-02 14:42:46 UTC (rev 6679)
@@ -4,3 +4,6 @@
# Mailing-list creation
55 * * * * root [ -x /usr/share/gforge/bin/create-mailing-lists.pl ] && /usr/share/gforge/bin/create-mailing-lists.pl > /dev/null 2>&1
+
+# Quick ML subscription
+5 * * * * root [ -x /usr/share/gforge/cronjobs/mm_quicksubscribe.sh ] && /usr/share/gforge/cronjobs/mm_quicksubscribe.sh >/dev/null 2>&1
Added: trunk/gforge_base/evolvisforge/gforge/cronjobs/mm_quicksubscribe.sh
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/cronjobs/mm_quicksubscribe.sh (rev 0)
+++ trunk/gforge_base/evolvisforge/gforge/cronjobs/mm_quicksubscribe.sh 2010-06-02 14:42:46 UTC (rev 6679)
@@ -0,0 +1,42 @@
+#!/bin/mksh
+#-
+# Quick mailing list subscribe – backend cronjob
+#
+# Copyright © 2010
+# Thorsten Glaser <t.glaser at tarent.de>
+# All rights reserved.
+#
+# This file is part of FusionForge. FusionForge is free software;
+# you can redistribute it and/or modify it under the terms of the
+# GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the Licence, or (at your option)
+# any later version.
+#
+# FusionForge is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with FusionForge; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#-
+# Processes subscription requests from /var/lib/gforge/mmsubscribe
+
+vlg=$(php -r 'require "'"$ETCGFORGE"'"; echo $var_lib_gforge;')
+
+cd "$vlg"
+rm -rf tmp/mm
+mkdir -p tmp/mm
+
+# mv is atomic
+mv -f mmsubscribe/* tmp/mm/
+
+cd tmp/mm
+for listname in *; do
+ [[ -e $listname && -s $listname ]] || continue
+ /usr/lib/mailman/bin/add_members -r "$listname" -a n -w y "$listname"
+done 2>&1 | logger -t fusionforge-cron-mm_quicksubscribe
+cd ..
+rm -rf mm
+exit 0
Property changes on: trunk/gforge_base/evolvisforge/gforge/cronjobs/mm_quicksubscribe.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/gforge_base/evolvisforge/gforge/install/lists-mailman
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/install/lists-mailman 2010-06-02 14:42:43 UTC (rev 6678)
+++ trunk/gforge_base/evolvisforge/gforge/install/lists-mailman 2010-06-02 14:42:46 UTC (rev 6679)
@@ -1,3 +1,4 @@
+cronjobs/mm_quicksubscribe.sh usr/share/gforge/cronjobs/
deb-specific/create-mailing-lists.pl usr/share/gforge/bin/
deb-specific/fix-mailing-lists.pl usr/share/gforge/bin/
deb-specific/fix_url2.py usr/lib/mailman/bin/
More information about the evolvis-commits
mailing list