#!/bin/sh
#
# This script is called when ppp connects to the network.
# Slrn usesit for refreshing newsgroup descriptions and
# pulling in news with slrnpull.
#
# Run slrnconfig or edit /etc/slrnget.conf to configure if 
# this file actually does anything.
#
# Written By Joey Hess <joeyh@master.debian.org>

# Source config file.
. /etc/slrnget.conf

# If term is not set to something sane, slrn gets upset.
TERM=vt100
export TERM

# Make sure the umask is sane as well.
umask 022

# Update descriptions.
if [ "$GETDESC_WITH_PPP" = "y" ] ; then
	/usr/sbin/slrn_getdescs >/dev/null
fi

# Fetch news.
if [ "$USE_SLRNPULL" = "y" -a "$SLRNPULL_WITH_PPP" = "y" ] ; then
	# Get new articles.
	slrnpull -h `cat /etc/nntpserver` >/dev/null
fi
