]> git.pld-linux.org Git - packages/at.git/blame - atd.init
- added neww patch for at from Debian.
[packages/at.git] / atd.init
CommitLineData
f4736427 1#!/bin/sh
283c91e0 2#
834145e0 3# atd Runs commands scheduled by the at command
283c91e0 4#
834145e0 5# chkconfig: 345 40 60
283c91e0 6#
834145e0 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
283c91e0 13
834145e0 14# Source function library
283c91e0 15. /etc/rc.d/init.d/functions
16
834145e0 17# Get service config
18[ -f /etc/sysconfig/atd ] && . /etc/sysconfig/atd
5d26daad 19
834145e0 20
21# See how we were called.
283c91e0 22case "$1" in
23 start)
834145e0 24 # Check if the service is already running?
25 if [ ! -f /var/lock/subsys/atd ]; then
8ba6303b 26 msg_starting at
834145e0 27 daemon atd
28 else
8ba6303b
JR
29 msg_Already_Running atd
30 exit 1
834145e0 31 fi
5d26daad 32 touch /var/lock/subsys/atd
283c91e0 33 ;;
34 stop)
8ba6303b 35 msg_stopping at
283c91e0 36 killproc atd
37 rm -f /var/lock/subsys/atd
38 ;;
39 reload|restart)
40 $0 stop
41 $0 start
42 ;;
43 status)
44 status atd
45 ;;
46 *)
8ba6303b 47 msg_Usage "$0 {start|stop|restart|reload|status}"
283c91e0 48 exit 1
49esac
50
51exit 0
This page took 0.141703 seconds and 4 git commands to generate.