]> git.pld-linux.org Git - packages/exim-lite.git/blob - exim.init
- Desktop file for Exim Monitor.
[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         DAEMON=yes
23         QUEUE=1h
24 fi
25
26 # Check that networking is up.
27 if is_no "${NETWORKING}"; then
28         msg_Network_Down Exim
29         exit 1
30 fi
31
32 [ -x /usr/bin/exim ] || exit 0
33
34 # See how we were called.
35 case "$1" in
36   start)
37         # Start daemons.
38         msg_starting exim
39         daemon /usr/bin/exim $([ "$DAEMON" = "yes" ] && echo -bd) \
40                                   $([ -n "$QUEUE" ] && echo -q$QUEUE)
41         touch /var/lock/subsys/exim
42         ;;
43   stop)
44         # Stop daemons.
45         msg_stopping exim
46         killproc exim
47         rm -f /var/lock/subsys/exim
48         ;;
49   restart)
50         $0 stop
51         $0 start
52         ;;
53   status)
54         status exim
55         ;;
56   *)
57         msg_Usage "$0 {start|stop|restart|status}"
58         exit 1
59 esac
60
61 exit 0
62
This page took 0.395064 seconds and 3 git commands to generate.