]> git.pld-linux.org Git - packages/exim.git/blame - exim.init
- removed paths
[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.
2afc326a 19if [ -f /etc/sysconfig/exim ]; then
9c228cad 20 . /etc/sysconfig/exim
6a7ed0b9 21else
6a7ed0b9 22 QUEUE=1h
23fi
24
01e5d0f3 25# Check that networking is up.
f188b1d5 26if is_yes "${NETWORKING}"; then
d809ed84 27 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
f188b1d5 28 msg_network_down Exim
29 exit 1
30 fi
31else
32 exit 0
c0b03131 33fi
01e5d0f3 34
d1e99794 35RETVAL=0
6a7ed0b9 36# See how we were called.
37case "$1" in
38 start)
9c228cad 39 # Start daemons.
9e7b57a4 40 if [ ! -f /var/lock/subsys/exim ]; then
41 msg_starting Exim
9dd2435d
SZ
42 daemon exim \
43 $( is_yes "$ALLOW_TCP_CONNECTIONS" && echo -bd ) \
44 $( [ -n "$QUEUE" ] && echo -q$QUEUE )
9e7b57a4 45 RETVAL=$?
46 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/exim
47 else
f188b1d5 48 msg_already_running Exim
9e7b57a4 49 fi
6a7ed0b9 50 ;;
51 stop)
52 # Stop daemons.
9e7b57a4 53 if [ -f /var/lock/subsys/exim ]; then
54 msg_stopping Exim
55 killproc exim
56 rm -f /var/lock/subsys/exim >/dev/null 2>&1
57 else
f188b1d5 58 msg_not_running Exim
9e7b57a4 59 fi
6a7ed0b9 60 ;;
9c228cad 61 restart)
6a7ed0b9 62 $0 stop
63 $0 start
d1e99794 64 exit $?
6a7ed0b9 65 ;;
66 status)
67 status exim
d1e99794 68 exit $?
6a7ed0b9 69 ;;
d1e99794 70 reload|force-reload)
71 if [ -f /var/lock/subsys/exim ]; then
72 msg_reloading Exim
73 killproc exim -HUP
74 RETVAL=$?
75 else
76 msg_not_running Exim >&2
77 exit 7
78 fi
ee785f0b 79 ;;
6a7ed0b9 80 *)
d1e99794 81 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
82 exit 3
6a7ed0b9 83esac
84
9e7b57a4 85exit $RETVAL
This page took 0.04529 seconds and 4 git commands to generate.