summaryrefslogtreecommitdiff
blob: 5af8590e0d5a33ab10db14e7380dc6fad6346a2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/sys-apps/at/files/atd,v 1.1 2000/08/02 17:10:25 achim Exp $

#RCUPDATE:2 3 4:75:

. /etc/rc.d/config/functions

SERVICE=atd
EXE=/usr/sbin/atd
PIDFILE=/var/run/atd.pid
opts="start stop restart"

# See how we were called.

function start() {

        # Start daemons.

        ebegin "Starting ${SERVICE}..."
	start-stop-daemon --start --quiet --exec ${EXE}
	eend $? "Started $SERVICE." "Error Starting ${SERVICE}"

}

function stop() {

        # Stop daemons.

        ebegin "Shutting down ${SERVICE}..."
	start-stop-daemon --stop --quiet --pidfile ${PIDFILE} 
	eend $? "Stopped $SERVICE." "Error Stopping ${SERVICE}."

}

function restart () {

	stop
	start

}

doservice ${@}