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