#!/bin/sh
########################################################################
# Begin atd
#
# Description : Start atd daemon
#
# Author      : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version     : LFS 7.2
#
########################################################################

### BEGIN INIT INFO
# Provides:            atd
# Required-Start:      $time
# Should-Start:        
# Required-Stop:       
# Should-Stop:         
# Default-Start:       2 3 4 5
# Default-Stop:        0 1 6
# Short-Description:   atd daemon
# Description:         Run jobs queued for later execution
# X-LFS-Provided-By:   BLFS / LFS 7.2
### END INIT INFO

. /lib/lsb/init-functions

#$LastChangedBy: bdubbs $
#$Date: 2012-05-09 20:19:23 +0000 (Wed, 09 May 2012) $

case "$1" in
   start)
      log_info_msg "Starting atd..."
      start_daemon /usr/sbin/atd
      evaluate_retval
      ;;

   stop)
      log_info_msg "Stopping atd..."
      killproc /usr/sbin/atd
      evaluate_retval
      ;;

   restart)
      $0 stop
      sleep 1
      $0 start
      ;;

   status)
      statusproc /usr/sbin/atd
      ;;

   *)
      echo "Usage: $0 {start|stop|restart|status}"
      exit 1
      ;;
esac

# End atd

