#!/bin/sh
#
# Startet den at demon

. /etc/init.d/rc.functions

DAEMON=atd
NAME=${0##*/}
PID_FILE=/var/run/$NAME.pid

case "$1" in
	start)
		echo "Staring $NAME:"
		start-stop-daemon -S -q -p $PID_FILE -m -b -x $DAEMON
		check_status
		;;
	stop)
		echo "Stoping $NAME:"
		start-stop-daemon -K -q -p $PID_FILE
		check_status
		;;
	restart)
		$0 stop
		$0 start
		;;
	init)
		start=1
		;;
	*)
		echo "Usage $0 {start | stop | restart}" >&2
		exit 1
esac

