#!/bin/sh
# Run the expire function of apt-cacher-ng non-interactively (unless errors 
# are detected).

# optional, specify hostname to appear in error messages and links
# HOSTNAME=externallyVisibleHostName
# export HOSTNAME

# optional, specify IP address to connect to
# ACNGIP=10.0.1.3
# export ACNGIP

if test -r /usr/lib/apt-cacher-ng/expire-caller.pl ; then
   perl /usr/lib/apt-cacher-ng/expire-caller.pl || echo Please check error messages in one of: $(ls -t /var/log/apt-cacher-ng/maint*.log.html | head -n5)
fi
