]> git.pld-linux.org Git - packages/exim-lite.git/blob - exim.init
- added "ALLOW_TCP_CONNECTIONS" option
[packages/exim-lite.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 \
38                         $( is_yes "$ALLOW_TCP_CONNECTIONS" && echo -bd ) \
39                         $( [ -n "$QUEUE" ] && echo -q$QUEUE )
40                 RETVAL=$?
41                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/exim
42         else
43                 msg_Already_Running Exim
44         fi
45         ;;
46   stop)
47         # Stop daemons.
48         if [ -f /var/lock/subsys/exim ]; then
49                 msg_stopping Exim
50                 killproc exim
51                 rm -f /var/lock/subsys/exim >/dev/null 2>&1
52         else
53                 msg_Not_Running Exim
54                 exit 1
55         fi      
56         ;;
57   restart)
58         $0 stop
59         $0 start
60         ;;
61   status)
62         status exim
63         ;;
64   reload)
65         msg_reloading Exim
66         killproc exim -HUP
67         ;;
68   *)
69         msg_Usage "$0 {start|stop|restart|reload|status}"
70         exit 1
71 esac
72
73 exit $RETVAL
74
This page took 0.030021 seconds and 3 git commands to generate.