]> git.pld-linux.org Git - packages/exim.git/blame - exim.init
mysql isn't compiled by default, now
[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
37 daemon exim -bd $([ -n "$QUEUE" ] && echo -q$QUEUE)
38 RETVAL=$?
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/exim
40 else
41 msg_Already_Running Exim
42 fi
6a7ed0b9 43 ;;
44 stop)
45 # Stop daemons.
9e7b57a4 46 if [ -f /var/lock/subsys/exim ]; then
47 msg_stopping Exim
48 killproc exim
49 rm -f /var/lock/subsys/exim >/dev/null 2>&1
50 else
51 msg_Not_Running Exim
52 exit 1
53 fi
6a7ed0b9 54 ;;
9c228cad 55 restart)
6a7ed0b9 56 $0 stop
57 $0 start
58 ;;
59 status)
60 status exim
61 ;;
62 *)
c0b03131 63 msg_Usage "$0 {start|stop|restart|status}"
6a7ed0b9 64 exit 1
65esac
66
9e7b57a4 67exit $RETVAL
6a7ed0b9 68
This page took 0.088021 seconds and 4 git commands to generate.