#!/bin/sh
#
# This file is part of SnarfNews
# Copyright (C) 1991,1992,1993,1994,1995,1996 Alec Muffett
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

# where snarf software is located
SNARFHOME="/home/alecm/snarf,1.4"

# IMPORTANT! These two must be set for "snarf" to forward properly!

# - domain within which your host resides
SNARFDOMAIN=Domain.Name

# - full name of host upon which snarf is being run
SNARFHOST=Hostname.$SNARFDOMAIN

# whom to mail when things go wrong
SNARFADMIN=postmaster

# ordinary 'mail' command on this system - pick one
#SNARFMAIL=mailx
#SNARFMAIL=Mail
SNARFMAIL=mail

# when gronking via nntp, drop articles cross-posted to more than this
# number of groups (0==disable); this is computationally cheaper than
# 'filterart' and filterbatch (saves a process) but is less powerful.
# OTOH, gronknntp can check before *pulling* articles - filterbatch
# cannot.  Recommended values are 0 or 9
SNARFXPOSTMAX=9

# if using SOCKS, to be picked up by "runsocks" if used in feeds file
SOCKS_SERVER=localhost

# sundry directories
SNARFBIN="$SNARFHOME/bin"           # frontend scripts
SNARFCONF="$SNARFHOME/conf"         # config files
SNARFLIB="$SNARFHOME/lib"           # backend scripts and libraries
SNARFRUN="$SNARFHOME/run"           # runtime files
SNARFSAVE=/tmp                      # where 'gronknntp -save' puts files
SNARFSECRET="$SNARFHOME/secret"     # pgp/idea passphrase directory
SNARFSPOOL="/var/spool/news"        # where raw news articles are stored
SNARFOUT="$SNARFSPOOL/out.going"    # where out.going/queuename files are

# perl library pickups
PERL5LIB=$SNARFLIB:$PERL5LIB

# generic PATH to catch prettywell everything
PATH="$SNARFBIN:$SNARFLIB:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/ccs/bin:/usr/ucb:/usr/etc:/usr/lib:/etc:$PATH"

# push 'em out.
export SNARFHOME SNARFDOMAIN SNARFHOST SNARFADMIN SNARFMAIL
export SNARFXPOSTMAX SNARFBIN SNARFCONF SNARFLIB SNARFRUN
export SNARFSAVE SNARFSECRET SNARFSPOOL SNARFOUT SOCKS_SERVER
export PERL5LIB PATH

##################################################################

if [ $# -lt 1 ]
then
    echo "Usage: snarf command ..." 1>&2
    exit 1
fi

umask 077

exec "$@"

echo "snarf: exec: $@" 1>&2

exit 1
