]> git.pld-linux.org Git - packages/exim-lite.git/blame - exim.init
- added "ALLOW_TCP_CONNECTIONS" option
[packages/exim-lite.git] / exim.init
CommitLineData
cdaabff3 1#!/bin/sh
2#
d1b56fb4 3# exim This shell script takes care of starting and stopping Exim.
cdaabff3 4#
d1b56fb4
JR
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
1248b360
AM
11
12# Source function library.
cdaabff3 13. /etc/rc.d/init.d/functions
14
1248b360 15# Source networking configuration.
cdaabff3 16. /etc/sysconfig/network
17
d1b56fb4 18# Source exim configureation.
1248b360
AM
19if [ -f /etc/sysconfig/exim ] ; then
20 . /etc/sysconfig/exim
cdaabff3 21else
cdaabff3 22 QUEUE=1h
23fi
24
d6a5e20a 25# Check that networking is up.
d1b56fb4
JR
26if is_no "${NETWORKING}"; then
27 msg_Network_Down Exim
28 exit 1
29fi
d6a5e20a 30
cdaabff3 31# See how we were called.
32case "$1" in
33 start)
1248b360 34 # Start daemons.
10329cff 35 if [ ! -f /var/lock/subsys/exim ]; then
36 msg_starting Exim
5695d551
SZ
37 daemon exim \
38 $( is_yes "$ALLOW_TCP_CONNECTIONS" && echo -bd ) \
39 $( [ -n "$QUEUE" ] && echo -q$QUEUE )
10329cff 40 RETVAL=$?
41 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/exim
42 else
43 msg_Already_Running Exim
44 fi
cdaabff3 45 ;;
46 stop)
47 # Stop daemons.
10329cff 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
cdaabff3 56 ;;
1248b360 57 restart)
cdaabff3 58 $0 stop
59 $0 start
60 ;;
61 status)
62 status exim
63 ;;
c7803849 64 reload)
65 msg_reloading Exim
66 killproc exim -HUP
67 ;;
cdaabff3 68 *)
c7803849 69 msg_Usage "$0 {start|stop|restart|reload|status}"
cdaabff3 70 exit 1
71esac
72
10329cff 73exit $RETVAL
cdaabff3 74
This page took 0.105914 seconds and 4 git commands to generate.