#!/bin/sh # @(#)welcome.global 4.2 CREN 95/05/03 # # Copyright (c) 1993-95 by # the Corporation for Research and Educational Networking (CREN) # # All rights reserved. This software comprises confidential # information of CREN and may not be used, copied or made available to anyone, # except in accordance with the license under which it is furnished. # # SCCS file: /usr/SCCS/home/server/listproc/s.welcome.global # #!/bin/sh # Global welcome file for subscription to a list. # When a new subscription is entered, this script is executed and the output # is sent to the new subscriber. The user's request is piped to stdin, and # the following arguments will be passed: # # $1: The list's name # $2: the list's address # $3: The owner's address # $4: The server's address for requests # $5: The address the user has been subscribed with # $6: The user's initial password # $7: A boolean: 1 if the system accepts live connections; 0 otherwise # $8: A boolean: 1 if the list allows change of subscription address; 0 otherwise # $9: The value of the LPDIR environment variable # # Notice: this file is not required to be a script! ### ### RWR added 28 March 1996 ### Robert Reed, PM Info Svc, IST-UCF, rreed@ist.ucf.edu ### # This file has been tailored to permit several new options ... # 1. If the file ".welcome.substitute" is found in a specific list # directory, then it will completely replace the global welcome # 2. If .welcome.substitute is NOT found, then # a. If the file ".welcome.pre" is found, it will be added at # the top of the global welcome, prior to the global welcome # messages. If not found, global welcome begins # b. If the file ".welcome" is found, it will be added after the # global welcome (behaves as in previous releases) # c. If the file ".welcome.post" is found, it will be add last; # after the global welcome and after the standard .welcome # (if present) # 3. All of the ".welcome...." files are optional and may be used # in any combination. They are echo'd into the final welcome # (means they are NOT interpretted as scripts). # ### Extensive testing has NOT been done. Mild testing has ;-) ### ### The contents of the global welcome should be changed as appropriate. ### I provide what I use, not what the distribution global welcome does. ### However, it should be pretty simple to modify for local needs. ### ### ### 2/29/96 - Made slight modifications to Robert Reed's additions, to ### make the messages more general. ### -J. Robert von Behren, CREN programmer/analyst, jrvb@cren.net ### ### If the file ".welcome.substitute" exists in the list directory, ### then it will completely substitute this global welcome. ### lwsub=$9/lists/`echo $1 | tr '[a-z]' '[A-Z]'`/.welcome.substitute if [ -f "$lwsub" ] then cat $lwsub exit 0 fi ### ### Welcome intro ### cat << EOF Welcome to the $1 discussion list!! This message describes how to use your subscription. Please keep this message for future reference. EOF ### ### Check for "pre-welcome" ### # Include the list-specific .welcome.pre file, if found; lw=$9/lists/`echo $1 | tr '[a-z]' '[A-Z]'`/.welcome.pre if [ -f $lw ]; then cat $lw fi ### ### Begin "stock" body of welcome ### cat < /tmp/echo if [ "`grep c /tmp/echo`" = "a\c" ]; then n='-n' c='' else n='' c='\c' fi rm /tmp/echo echo $n "This password is to be used $c" if [ $7 -eq 1 ]; then cat << EOF EOF fi if [ $7 -eq 1 -a $8 -eq 1 ]; then or="or when" else or="" fi if [ $8 -eq 1 ]; then cat << EOF when you wish to change the address you are subscribed with. In this case, issue the following request to $4: set $1 address $6 new-address EOF fi fi cat << EOF ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ UNSUBSCRIBING Should you desire to unsubscribe from this list in the future, simply send a message to $4. Include the "unsubscribe" command in the body of the message, as follws: unsubscribe $1 If you wish to unsubscribe from ALL lists handled by $4, send this command: purge $6 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ MORE HELP For more information on using ListProc discussion lists, use your web browser to view the User Reference Card, http://www.cren.net/www/listproc/usercard.html or send the command HELP on a line by itself in a message to this ListProc server: $4. EOF ### ### Check for "list specific welcome" ### # Include the list-specific .welcome file, if found; lw=$9/lists/`echo $1 | tr '[a-z]' '[A-Z]'`/.welcome if [ -f $lw ]; then cat $lw fi ### ### Check for "post-welcome" ### # Include the list-specific .welcome.post file, if found; lw=$9/lists/`echo $1 | tr '[a-z]' '[A-Z]'`/.welcome.post if [ -f $lw ]; then cat $lw fi exit 0