]> git.pld-linux.org Git - packages/at.git/blame - atd.init
- LSB compliance
[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
5f0e4304 20RETVAL=0
834145e0 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
5f0e4304 28 RETVAL=$?
29 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/atd
834145e0 30 else
7474e190 31 msg_already_running atd
834145e0 32 fi
283c91e0 33 ;;
34 stop)
5f0e4304 35 if [ -f /var/lock/subsys/atd ]; then
36 msg_stopping at
37 killproc atd
38 rm -f /var/lock/subsys/atd
39 else
40 msg_not_running atd
41 fi
283c91e0 42 ;;
5f0e4304 43 force-reload|restart)
283c91e0 44 $0 stop
45 $0 start
5f0e4304 46 exit $?
283c91e0 47 ;;
48 status)
49 status atd
5f0e4304 50 exit $?
283c91e0 51 ;;
52 *)
5f0e4304 53 msg_usage "$0 {start|stop|restart|force-reload|status}"
54 exit 3
283c91e0 55esac
56
5f0e4304 57exit $RETVAL
This page took 0.095412 seconds and 4 git commands to generate.