]> git.pld-linux.org Git - packages/exim.git/blob - exim.init
minor changes
[packages/exim.git] / exim.init
1 #!/bin/sh
2 #
3 # exim          This shell script takes care of starting and stopping
4 #               Exim.
5 #
6 # chkconfig: 2345 80 30
7 # description: Exim is a Mail Transport Agent, which is the program \
8 #              that moves mail from one machine to another.
9 # processname: exim
10 # config: /etc/exim.cf
11 # pidfile: /var/run/exim.pid
12
13 # Source function library.
14 . /etc/rc.d/init.d/functions
15
16 # Source networking configuration.
17 . /etc/sysconfig/network
18
19 # Source sendmail configureation.
20 if [ -f /etc/sysconfig/exim ] ; then
21         . /etc/sysconfig/exim
22 else
23         DAEMON=yes
24         QUEUE=1h
25 fi
26
27 # Check that networking is up.
28 [ "${NETWORKING}" = "no" ] && exit 0
29
30 [ -f /usr/bin/exim ] || exit 0
31
32 # See how we were called.
33 case "$1" in
34   start)
35         # Start daemons.
36         show Starting exim:
37         daemon +5 exim $([ "$DAEMON" = yes ] && echo -bd) \
38                                   $([ -n "$QUEUE" ] && echo -q$QUEUE)
39         touch /var/lock/subsys/exim
40         ;;
41   stop)
42         # Stop daemons.
43         show Shutting down exim:
44         killproc exim
45         rm -f /var/lock/subsys/exim
46         ;;
47   restart)
48         $0 stop
49         $0 start
50         ;;
51   status)
52         status exim
53         ;;
54   *)
55         echo "Usage: $0 {start|stop|restart|status}"
56         exit 1
57 esac
58
59 exit 0
60
This page took 0.51087 seconds and 4 git commands to generate.