3 # exim This shell script takes care of starting and stopping Exim.
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.
10 # pidfile: /var/spool/exim/exim-daemon.pid
12 # Source function library.
13 . /etc/rc.d/init.d/functions
15 # Source networking configuration.
16 . /etc/sysconfig/network
20 # Source exim configureation.
21 if [ -f /etc/sysconfig/exim ]; then
25 # Check that networking is up.
26 if is_yes "${NETWORKING}"; then
27 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
28 msg_network_down "Exim"
37 if [ -f /var/lock/subsys/exim ]; then
38 msg_already_running "Exim"
43 daemon /usr/bin/exim \
44 $( is_yes "$ALLOW_TCP_CONNECTIONS" && echo -bd ) \
45 $( [ -n "$QUEUE" ] && echo -q$QUEUE )
46 for CONFIG in $EXIM_EXTRA_CONFIGS; do
47 msg_starting "Exim ($CONFIG)"
49 $( is_yes "$ALLOW_TCP_CONNECTIONS" && echo -bd ) \
50 $( [ -n "$QUEUE" ] && echo -q$QUEUE ) \
54 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/exim
59 if [ ! -f /var/lock/subsys/exim ]; then
60 msg_not_running "Exim"
65 killproc --pidfile /var/spool/exim/exim-daemon.pid exim
66 rm -f /var/lock/subsys/exim /var/spool/exim/exim-daemon.pid >/dev/null 2>&1
70 if [ ! -f /var/lock/subsys/exim ]; then
71 msg_not_running "Exim"
81 if [ ! -f /var/lock/subsys/exim ]; then
82 msg_not_running "Exim"
87 run_cmd "Checking exim configuration" /usr/bin/exim -bV
96 # See how we were called.
114 checkconfig|configtest)
123 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|configtest|status}"