#! /bin/sh
# /etc/init.d/anacron: start anacron
#
# Written by Christian Schwarz <schwarz@debian.org>

PATH=/bin:/usr/bin:/sbin:/usr/sbin

test -f /usr/sbin/anacron || exit 0

case "$1" in
  start)
    # Run anacron only if it's later than 7:30am.
    if test `date +%H%M` -lt 730; then
	exit 0
    fi
    echo -n "Starting anac(h)ronistic cron: anacron"
    anacron -s
    echo "."
    ;;
  restart|force-reload|stop)
    :
    ;;
  *)
    echo "Usage: /etc/init.d/anacron start"
    exit 1
    ;;
esac

exit 0
