blob: eca379b3cd9038add93de46244192b23fc8cd176 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/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