Hi,

If you have shell access to the Listserv server I suppose you could do this manually by creating and editing the appropriate text files and directories. At least on Linux this would be easy to script.

The following might leave some questions, but the online documentation should help you out if necessary.

I think the following would result in a minimal list setup (but any critical review would be welcome):
- Create a 'TEMPLATE-LIST' using the web interface, and configure it as desired. This will be the 'default' configuration for your new scripted lists. There may be some small caveats; for example, I would give a title that is identical to the list name to make the scripting easier

- use the 'listview' command in the Listserv installation directory to convert the <TEMPLATE-LIST>.list file to text.

- Investigate your listserv installation which further files and directories have been created using you template list name, for example:
        * <TEMPLATE-LIST>.wwwtpl
        * <TEMPLATE-LIST>.mailtpl
        * <TEMPLATE-LIST> notebook directory (path should be in the text .list file you just created)
        * <TEMPLATE-LIST> archive directory (usually a subdirectory of your webserver root directory
        * <TEMPLATE-LIST> archive directory contents. (take special note of any <TEMPLATE-LIST>.private file in the archive directory, which is important for the privacy settings)

- You can use the <TEMPLATE-LIST> files as template by simply replacing all occurences of the list name by the desired name, for example using sed:
        sed 's/<TEMPLATE-LIST>/newlist/g' <TEMPLATE-LIST>.list > newlist.list
You can do this for all files that contain the list name

- Directories and files that contain the list name in their name you can simply create using the standard commands (mkdir, cp, ...)

- Create the appropriate entries in your 'aliases' file for the new list (don't forget to run 'newaliases' after you're finished)

The above actions can easily be combined in a shell script that reads a file containing all new list names, and  performs the above actions automatically for each list. Something like:
   for NEWNAME in `cat newnames.txt`
   do
      sed 's/TEMPLATE-LIST/${NEWNAME}/g' <TEMPLATE-LIST>.list > ${NEWNAME}.list
      mkdir /home/listserv/home/${NEWNAME}
      sed 's/TEMPLATE-LIST/${NEWNAME}/g' /home/listserv/home/TEMPLATE-LIST.wwwtpl > /home/listserv/home/${NEWNAME}
      grep 'TEMPLATE-LIST' /etc/aliases | sed 's/TEMPLATE-LIST/${NEWNAME}/g' >> /etc/aliases
     
[etc etc, I have not added all necessary actions to this script example! Also you must make sure all file references and paths are correct before you run the script]
   done


Choose the name for your TEMPLATE-LIST carefully so that it does not 'overlap' with the any new name, this could lead to unexpected results for example in he grep command above.

Make sure all files and directories are created in the correct place. The first time listserv restarts it will convert all .list files to the binary format and you're ready to go. And, but I suppose this goes without saying: test your script before you run it on a production machine!

Hope this helps.

Regards,
Lucas
Op 14-2-2013 23:30, Marshall, Clinton C schreef:
[log in to unmask]" type="cite">

Hello,

 

We have had a request to create 976 lists, has anyone created multiple lists using any scripting techniques or if it is actually possible to use scripting to do this?.

 

I looked at cloning at one stage but all the new creations ended pointing to the one archive file

 

regards

Clinton



To unsubscribe from the LSTSRV-L list, click the following link:
http://peach.ease.lsoft.com/scripts/wa-PEACH.exe?SUBED1=LSTSRV-L&A=1




To unsubscribe from the LSTSRV-L list, click the following link:
http://peach.ease.lsoft.com/scripts/wa-PEACH.exe?SUBED1=LSTSRV-L&A=1