Article View: news.software.readers
Article #4756Re: tin with two NNTPSERVER?
From: Sergio L Aponte
Date: Wed, 30 Jun 1993 17:01
Date: Wed, 30 Jun 1993 17:01
87 lines
3139 bytes
3139 bytes
Ever since I have used Tin I do this, and the best way I found is
with a shell script which switches my environment to the proper server
setup.
Under my home dir a have two dirs, .server1 and .server2. By setting
my Tin variables I have separate indeces, newsrc, tinrc, etc...
Here is the script. I will try to add comments.
I call it tinsh.
================================================================================
#!/bin/sh
#
# tinsh : Bourne shell script to fire up tin against either server1,
# server2 or server3, our NNTP hosts.
if [ "$1" = "" ] # No host specified
then
echo ""
echo "Please specify host...server1, server2 or server3"
echo ""
sleep 3
exit 1
fi
TINDIR="$HOME/.$1"; export TINDIR
if [ ! -d $TINDIR ]
then
mkdir $TINDIR
fi
case $1 in
server1 )
DISTRIBUTION="net"; export DISTRIBUTION
NNTPSERVER="server1"; export NNTPSERVER
;;
server2 )
DISTRIBUTION="local"; export DISTRIBUTION
NNTPSERVER="server2"; export NNTPSERVER
;;
server3 )
DISTRIBUTION="local"; export DISTRIBUTION
NNTPSERVER="server3"; export NNTPSERVER
;;
*)
echo ""
echo "Host unknown...use server1, server2 or server3 ..."
echo ""
exit 1
;;
esac
# I have two different "builds" of Tin with different options. This allows me
# to use the TINEXEC variable to control which one I use. If not set, use tin
if [ "$TINEXEC" = "" ]
then
# Use default Tin executable
TEXEC=tin; export TEXEC
else
TEXEC=$TINEXEC; export TEXEC
fi
# If MAILER is not set, set a MAILER. Otherwise, assume user knows what is doing
if [ "$MAILER" = "" ]
then
# Set MAILER so that Subject: shows
MAILER=/usr/ucb/Mail; export MAILER
fi
exec $TEXEC -r -m $HOME/mail -f $HOME/.newsrc$1
================================================================================
Is simple, could possibly be better, but has done the job since
Tin 1.1 PL1...
--
Sergio L. Aponte
Technical Services Manager
Latin America Operations
===============================================================
Sergio L. Aponte, SMTS @ Ingres, an ASK Company
Internet : sergio@coqui.ingres.com
UUCP : {sun,mtxinu,pyramid,pacbell}!ingres!coqui!sergio
Technical Details
Message-ID:
<1993Jun30.170154.20924@pony.Ingres.COM>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!rtech!ingres!sergioReferences:
<1993Jun30.104424.22063@usage.csd.unsw.OZ.AU> <1993Jun30.122544.12388@monu6.cc.monash.edu.au>Show Full Headers
Complete Article Headers
Message-ID: <1993Jun30.170154.20924@pony.Ingres.COM> Subject: Re: tin with two NNTPSERVER? Date: Wed, 30 Jun 1993 17:01:54 +0000 From: sergio@Ingres.COM (Sergio L Aponte) References: <1993Jun30.104424.22063@usage.csd.unsw.OZ.AU> <1993Jun30.122544.12388@monu6.cc.monash.edu.au> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!rtech!ingres!sergio Newsgroups: news.software.readers Lines: 87 Organization: Ingres Corporation, A subsidiary of The ASK Group, Inc. X-Newsreader: TIN [version 1.2 PL0]