]> git.pld-linux.org Git - packages/at.git/blob - atd.init
- small fixes in permissions for pam.d or init.d
[packages/at.git] / atd.init
1 #!/bin/sh
2 #
3 # atd           Runs commands scheduled by the at command
4 #
5 # chkconfig:    345 40 60
6 #
7 # description:  Runs commands scheduled by the at command at the time \
8 #               specified when at was run, and runs batch commands when \
9 #               the load average is low enough.
10 #
11 # processname:  atd
12
13
14 # Source function library
15 . /etc/rc.d/init.d/functions
16
17 # Get service config
18 [ -f /etc/sysconfig/atd ] && . /etc/sysconfig/atd
19
20
21 # See how we were called.
22 case "$1" in
23   start)
24         # Check if the service is already running?
25         if [ ! -f /var/lock/subsys/atd ]; then
26                 show Starting at daemon
27                 daemon atd
28         else
29                 echo "atd already is running"
30         fi
31         touch /var/lock/subsys/atd
32         ;;
33   stop)
34         show Stopping at daemon
35         killproc atd
36         rm -f /var/lock/subsys/atd
37         ;;
38   reload|restart)
39         $0 stop
40         $0 start
41         ;;
42   status)
43         status atd
44         ;;
45   *)
46         echo "Usage: $0 {start|stop|restart|reload|status}"
47         exit 1
48 esac
49
50 exit 0
This page took 0.036207 seconds and 3 git commands to generate.