1#!/bin/sh
2#
3# Starts at daemon
4#
5
6umask 077
7
8# Source function library.
9. /etc/init.d/functions
10
11start() {
12	echo -n "Starting atd: "
13	start-stop-daemon --start --quiet --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f
14	echo "OK"
15}
16stop() {
17	echo -n "Stopping atd: "
18	start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid
19	echo "OK"
20}
21restart() {
22	stop
23	start
24}
25
26case "$1" in
27  start)
28	start
29	;;
30  stop)
31	stop
32	;;
33  restart|reload)
34	restart
35	;;
36  status)
37	status /usr/sbin/atd
38	;;
39  *)
40	echo $"Usage: $0 {start|stop|restart|status}"
41	exit 1
42esac
43
44exit $?
45
46