backport tiny modification
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Wed, 16 Feb 2005 15:59:30 +0000 (15:59 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:11 +0000 (23:28 +0200)
Patches applied:

 * opensource@polytechnique.org--2005/platal--release--0.9.4--patch-35
   tested, and work : at the end of a list creation, launch a custom command

git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-477

bin/lists.rpc.py

index 8a75ee9..7482c9a 100755 (executable)
@@ -71,6 +71,7 @@ PLATAL_DOMAIN2 = get_config('Mail', 'domain2', '')
 
 ML_OWNER       = get_config('Lists', 'admin_owner')
 VHOST_SEP      = get_config('Lists', 'vhost_sep', '_')
+ON_CREATE_CMD  = get_config('Lists', 'on_create', '')
 
 ################################################################################
 #
@@ -815,6 +816,9 @@ def create_list(userdesc,perms,vhost,listname,desc,advertise,modlevel,inslevel,o
         mlist._UpdateRecords()
         mlist.Save()
         mlist.Unlock()
+        if ON_CREATE_CMD != '':
+            try:    os.system(ON_CREATE_CMD + ' ' + name)
+            except: pass
     except:
         try:
             mlist.Unlock()