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