#!/bin/sh
#
# Leafnode cron job, invoked every 15 minutes to fetch news if we're on
# a permanent connection.

# Get configuration
. /etc/news/leafnode/debian-config

# Do the cd so that it doesn't matter if we cannot read /root.
cd /

# Get new news.
if [ "$NETWORK" = "permanent" -a -x /usr/sbin/fetchnews ]; then
   /usr/sbin/fetchnews
fi
