LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Valdis Kletnieks <[log in to unmask]>
Mon, 20 May 2002 11:00:00 -0400
text/plain (53 lines)
On Mon, 20 May 2002 17:45:02 +0300, Barak Moshe <[log in to unmask]>  said:

> I wonder though, how about GET and PUT ? This is also relatively easy, i.e tell
> the owner how to PUT files, and then he sends a short mail with GET
> instructions .. My only concern will be to automate the creation of the
> catalog, isn't it ? Anyone doing that ?

Here's a little chunk of ksh code to create the catalog, suitable for
calling via 'sudo' (or other automated means, if you wish).  I don't
see any reason you couldn't call this from within a cron job that sets up
new lists - if you run it as the 'listserv' user, you might want to remove
the 'chown' command.

Hope this helps...

/Valdis

--- rest of file is 'makefilelist' shell script
#!/bin/ksh
lsvhome="/home/listserv/home"
notebook="/home/listserv/notebooks"
listname=$1
# A filelist name is required...
if [ x$listname = x ];
then
        echo $0: listname required
        exit 1
fi
# and a corresponding list must exist for thw OWN(listname) stuff, so...
if [ ! -f ${lsvhome}/${listname}.list ];
then
        echo $0: List does not exist, must make filelist manually
        exit 1
fi
if [ ! -d ${notebook}/${listname} ];
then
        echo $0: $listname notebook directory doesnt exist.
        exit 1
fi

# OK, we have a list, a directory, and all the info needed..
# First, create the skeleton .catalog file
echo '*' > ${notebook}/${listname}/${listname}.catalog
echo "* ${listname} filelist" >> ${notebook}/${listname}/${listname}.catalog
echo '*' >> ${notebook}/${listname}/${listname}.catalog
chown listserv.listserv ${notebook}/${listname}/${listname}.catalog

# Now add it to site.catalog
echo "${listname}.catalog ${notebook}/${listname}/${listname}.catalog ALL OWN($listname)" >>
 ${lsvhome}/site.catalog

exit 0

ATOM RSS1 RSS2