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