home *** CD-ROM | disk | FTP | other *** search
/ Netscape Plug-Ins Developer's Kit / Netscape_Plug-Ins_Developers_Kit.iso / SOFTWARE / lsoft / unix / common.tz / common / go next >
Encoding:
Text File  |  1995-11-22  |  1.2 KB  |  73 lines

  1. #!/bin/sh
  2. #
  3. sleep 2
  4. lsv_dir=`dirname $0`
  5. cd $lsv_dir
  6. #
  7. . ./go.sys
  8. #
  9. . ./go.user
  10.  
  11. #
  12. MAILER=$MAILER"@"$NODE
  13. STOREPW=$CREATEPW
  14. #
  15. export A D Y LCOORD LMC MAXBSMTP SMTP_HOSTNAME SMTP_PORT
  16. export NJEDOMS PRIMETIME TRAPIN TRAPOUT USERID NODE CREATEPW LOCAL MAILER
  17. export MYDOMAIN POSTMASTER STOREPW TZONE STARTMSG S BITNET_ROUTE MYORG
  18. #
  19. USERID=`echo $USERID | tr '[a-z]' '[A-Z]'`
  20. THISUSER=`whoami | tr '[a-z]' '[A-Z]'`
  21. not_LSV="$USERID != $THISUSER"
  22. userid=`echo $USERID | tr '[A-Z]' '[a-z]'`
  23. #
  24. lsvexec=""
  25. lsvlog=""
  26. lsvdet=""
  27. notty="?"
  28. #
  29. if [ "$1" = "notty" ]
  30. then
  31.     is_bg=$2
  32.     notty="Y"
  33. else
  34.     is_bg=$1
  35.     if [ "$2" = "notty" ]
  36.     then
  37.         notty="Y"
  38.     fi
  39. fi
  40. #
  41. if [ "$notty" = "Y" ]
  42. then
  43.     lsvexec="exec"
  44. fi
  45. #
  46. if [ "$is_bg" = "bg" -o "$is_bg" = "background" ]
  47. then
  48.     if [ -s listserv.log ]
  49.     then
  50.         mv listserv.log listserv.log.OLD
  51.     fi
  52.     echo "> Starting LISTSERV as a background process"
  53.     lsvlog="2>&1 >listserv.log"
  54.     if [ "$notty" != "Y" ]
  55.     then
  56.         lsvdet="&"
  57.     fi
  58. fi
  59. #
  60. if [ $not_LSV ]
  61. then
  62.     lsvcomm="su $userid -c"
  63. else
  64.     lsvcomm="sh -c"
  65. fi
  66. #
  67. tty -s || {
  68.     lsvdet=""
  69.     lsvexec="exec"
  70. }
  71. #
  72. $lsvexec $lsvcomm "exec ./lsv $lsvlog $lsvdet"
  73.