#! /bin/sh
#
# This file was automatically customized by debmake on Thu, 20 Feb 1997 17:33:12 +0100
#
# Written by Miquel van Smoorenburg <miquels@drinkel.ow.org>.
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Modified for Debian by Christoph Lameter <clameter@debian.org>.
# Modified for Debian GNU/Linux by Martin Schulze <joey@infodrom.north.de>.

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/atd
PIDFILE=/var/run/atd.pid

# Arguments to atd
#
ARGS=""

test -x $DAEMON || exit 0

. /lib/lsb/init-functions

case "$1" in
  start)
    log_begin_msg "Starting deferred execution scheduler..."
    start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $ARGS
    log_end_msg $?
    ;;
  stop)
    log_begin_msg "Stopping deferred execution scheduler..."
    start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
    log_end_msg $?
    ;;
  force-reload|restart)
    sh $0 stop
    sh $0 start
    ;;
  *)
    log_success_msg "Usage: /etc/init.d/atd {start|stop|restart|force-reload}"
    exit 1
    ;;
esac

exit 0
