#!/bin/sh
#
# Cron.daily script for slrnpull.
# Written By Joey Hess <joeyh@master.debian.org>

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

if [ "$USE_SLRNPULL" = "y" ] ; then 
	# If term is set to "unknown", slrnpull may get upset.
	TERM=vt100
	export TERM

	# Perform expiration, even if we arn't fetching articles right now.
	slrnpull --expire >/dev/null

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