#!/bin/sh
##  $Revision: 8236 $
##  Set up any and all shell variables that an INN shell script
##  might need.  Also sets umask.

## NOTE: When adding stuff here, add the corresponding variables to 
## innshellvars.pl and innshellvars.tcl and innshellvars.csh

eval `/usr/local/news/bin/innconfval -s`

NEWSHOME=${PATHNEWS}
SPOOLBASE=${PATHSPOOL}
MOST_LOGS=${PATHLOG}
export NEWSHOME SPOOLBASE MOST_LOGS

NEWSBIN=${PATHBIN}
NEWSETC=${PATHETC}
NEWSLIB=/usr/local/news/lib
INNDDIR=${PATHRUN}
LOCKS=${PATHRUN}
export NEWSBIN NEWSETC NEWSLIB INNDDIR

ERRLOG=${MOST_LOGS}/errlog
LOG=${MOST_LOGS}/news

ARCHIVEDIR=${PATHARCHIVE}
SPOOL=${PATHARTICLES}
BATCH=${PATHOUTGOING}
INCOMING=${PATHINCOMING}
OVERVIEWDIR=${PATHOVERVIEW}
SPOOLNEWS=${PATHINCOMING}
BADNEWS=${PATHINCOMING}/bad

ACTIVE=${PATHDB}/active
ACTIVETIMES=${PATHDB}/active.times
CTLFILE=${NEWSETC}/control.ctl
CTLWATCH=${NEWSETC}/innwatch.ctl
HISTORY=${PATHDB}/history
NEWACTIVE=${PATHDB}/active.tmp
NEWSFEEDS=${NEWSETC}/newsfeeds
NEWSGROUPS=${PATHDB}/newsgroups
OLDACTIVE=${PATHDB}/active.old
PATH_MOTD=${NEWSETC}/motd.news
EXPIRECTL=${NEWSETC}/expire.ctl
LOCALGROUPS=${NEWSETC}/localgroups

CONTROLPROGS=${PATHCONTROL}
INNCONFVAL=${NEWSBIN}/innconfval
INND=${NEWSBIN}/innd
INNDSTART=${NEWSBIN}/inndstart
INNWATCH=${NEWSBIN}/innwatch
INEWS=${NEWSBIN}/inews
RNEWS=${NEWSBIN}/rnews
PERL_STARTUP_INND=${PATHFILTER}/startup_innd.pl
PERL_FILTER_INND=${PATHFILTER}/filter_innd.pl
PERL_FILTER_NNRPD=${PATHFILTER}/filter_nnrpd.pl
PYTHON_FILTER_INND=${PATHFILTER}/filter_innd.py
PATH_PYTHON_INN_MODULE=${PATHFILTER}/INN.py
PATH_TCL_STARTUP=${PATHFILTER}/startup.tcl
PATH_TCL_FILTER=${PATHFILTER}/filter.tcl

DAILY=${LOCKS}/LOCK.news.daily

NEWSCONTROL=${INNDDIR}/control
NNTPCONNECT=${INNDDIR}/nntpin
SERVERPID=${INNDDIR}/innd.pid
INNWSTATUS=${INNDDIR}/innwatch.status
WATCHPID=${INNDDIR}/innwatch.pid

AWK=/usr/bin/awk
SED=/usr/bin/sed
INNDF=${NEWSBIN}/inndf
EGREP=/usr/bin/egrep
PERL=/usr/bin/perl
GPGV=
PGP=
SORT="/usr/bin/sort"
GETFTP="/usr/local/news/bin/simpleftp"
UUX=uux

COMPRESS=/usr/bin/compress
GZIP=/usr/bin/gzip
UNCOMPRESS="/usr/bin/compress -d"
LOG_COMPRESS=/usr/bin/gzip
Z=.gz

if [ "$OVMETHOD" = "ovdb" ]; then
    DB_HOME="${PATHOVERVIEW}"
    export DB_HOME
fi

TEMPSOCK=`basename ${INNDDIR}/ctlinndXXXXXX | ${SED} -e 's/XXXXXX$/*/'`
TEMPSOCKDIR=`echo ${INNDDIR}/ctlinndXXXXXX | ${SED} -e 's@/[^/]*$@@'`

HAVE_UUSTAT=DONT

NEWSMASTER=usenet
NEWSUSER=news
NEWSGROUP=news

TMPDIR=${PATHTMP}; export TMPDIR;

SPOOLTEMP=${PATHTMP}

NEWSLBIN=${NEWSHOME}/local
export NEWSLBIN

umask 02

PATH=${NEWSLBIN}:${NEWSBIN}:${PATH}:/bin:/usr/bin:/usr/ucb
export PATH

HOME=$PATHNEWS
export HOME
