# -*- tcl -*-
#
# Author:       James Brister <brister@vix.com> -- berkeley-unix --
# Start Date:   Sat, 24 Aug 1996 23:45:34 +0200
# Project:      INN
# File:         innshellvars.tcl
# RCSId:        $Id: innshellvars.tcl.in,v 1.8 2003/12/26 03:23:29 rra Exp $
# Description:  Set up any and all variables that an INN tcl script
#               might need.

set prefix "@prefix@"
set exec_prefix "@exec_prefix@"
eval `@bindir@/innconfval -t`

set inn_newshome "$inn_pathnews"
set inn_newslib "@libdir@"
set inn_spooldir "$inn_pathspool"
set inn_most_logs "$inn_pathlog"

set inn_errlog "${inn_most_logs}/errlog"
set inn_log "${inn_most_logs}/news"

set inn_batch "${inn_pathoutgoing}"
set inn_incoming "${inn_pathincoming}"
set inn_spool "${inn_patharticles}"
set inn_overviewdir "${inn_pathoverview}"
set inn_archivedir "${inn_patharchive}"
set inn_badnews "${inn_pathincoming}/bad"
set inn_spoolnews "${inn_pathincoming}"

set inn_newslbin "${inn_newshome}/local"
set inn_innddir "${inn_pathrun}"
set inn_locks "${inn_pathrun}"
set inn_newsbin "${inn_pathbin}"
set inn_newsetc "${inn_newshome}/etc"

set inn_active "${inn_pathdb}/active"
set inn_activetimes "${inn_pathdb}/active.times"
set inn_ctlfile "${inn_newsetc}/control.ctl"
set inn_ctlwatch "${inn_newsetc}/innwatch.ctl"
set inn_history "${inn_pathdb}/history"
set inn_newactive "${inn_pathdb}/active.tmp"
set inn_newsfeeds "${inn_newsetc}/newsfeeds"
set inn_newsgroups "${inn_pathdb}/newsgroups"
set inn_oldactive "${inn_pathdb}/active.old"
set inn_localgroups "${inn_newsetc}/localgroups"
set inn_expirectl "${inn_newsetc}/expire.ctl"
set inn_path_motd "${inn_newsetc}/motd.news"

set inn_daily "${inn_locks}/locks/LOCK.news.daily"

set inn_inews "${inn_newsbin}/inews"
set inn_innconfval "${inn_newsbin}/innconfval"
set inn_innd "${inn_newsbin}/innd"
set inn_innwatch "${inn_newsbin}/innwatch"
set inn_rnews "${inn_newsbin}/rnews"
set inn_controlprogs "${inn_pathcontrol}/control"
set inn_perl_startup_innd "${inn_pathfilter}/startup_innd.pl"
set inn_perl_filter_innd "${inn_pathfilter}/filter_innd.pl"
set inn_perl_filter_nnrpd "${inn_pathfilter}/filter_nnrpd.pl"
set inn_python_filter_innd "${pathfilter}/filter_innd.py"
set inn_path_python_inn_module "${pathfilter}/INN.py"
set inn_path_tcl_startup "${inn_pathfilter}/startup.tcl"
set inn_path_tcl_filter "${inn_pathfilter}/filter.tcl"

set inn_newscontrol "${inn_innddir}/control"
set inn_nntpconnect "${inn_innddir}/nntpin"
set inn_innwstatus "${inn_innddir}/innwatch.status"
set inn_watchpid "${inn_innddir}/innwatch.pid"
set inn_serverpid "${inn_innddir}/innd.pid"

set inn_awk "@AWK@"
set inn_sed "@SED@"
set inn_perl "@PERL@"
set inn_gpgv "@GPGV@"
set inn_pgp "@PGP@"
set inn_inndf "${inn_newsbin}/inndf"
set inn_egrep "@EGREP@"
set inn_sort "@SORT@"
set inn_getftp "@GETFTP@"
set inn_compress "@COMPRESS@"
set inn_gzip "@GZIP@"
set inn_uncompress "@UNCOMPRESS@"
set inn_log_compress "@LOG_COMPRESS@"
set inn_z "@LOG_COMPRESSEXT@"

set inn_tempsock [ eval exec basename ${inn_innddir}/ctlinndXXXXXX | $inn_sed -e {s/XXXXXX$/*/} ]
set inn_tempsockdir [ exec echo ${inn_innddir}/ctlinndXXXXXX | $inn_sed -e {s@/[^/]*$@@} ]

set inn_newsmaster "@NEWSMASTER@"
set inn_newsuser "@NEWSUSER@"
set inn_newsgroup "@NEWSGRP@"

set env(TMPDIR) "$inn_pathtmp"
set inn_tmpdir "$inn_pathtmp"
set inn_spooltemp "$inn_pathtmp"

scan "@NEWSUMASK@" "%o" inn_umask

set env(PATH) "$inn_newslbin:$inn_newsbin:$env(PATH):/bin:/usr/bin"
