RE: [Exim] chkconfig on RH

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Chris Russell
Fecha:  
A: Suresh Ramasubramanian
Cc: exim-users
Asunto: RE: [Exim] chkconfig on RH

> A more appropriate one would be the sendmail initscript till 8.11.6

(for only one sendmail
> process instead of MTA and MSA proceses)


Like I did I think ;) see one of my confs.....

#!/bin/bash
#
# Exim      This shell script takes care of starting and stopping
#           Exim.
#
# chkconfig: 2345 80 30
# description: Sendmail is a Mail Transport Agent, which is the program
\
#              that moves mail from one machine to another.
# processname: exim
# config: /etc/mail/sendmail.cf
# pidfile: /var/run/sendmail.pid


# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Source sendmail configureation.
if [ -f /etc/sysconfig/exim ] ; then
        . /etc/sysconfig/exim
else
        DAEMON=no
        QUEUE=1h
fi


# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/exim/bin/exim ] || exit 0

RETVAL=0
prog="exim"

start() {
        # Start daemons.


        echo -n $"Starting $prog: "
          daemon /usr/exim/bin/exim -bd \
                                $([ -n "$QUEUE" ] && echo -q$QUEUE)
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/exim



        return $RETVAL
}


stop() {
        # Stop daemons.
        echo -n $"Shutting down $prog: "
        killproc exim
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/exim
        return $RETVAL
}


# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|reload)
        stop
        start
        RETVAL=$?
        ;;
  condrestart)
        if [ -f /var/lock/subsys/exim ]; then
            stop
            start
            RETVAL=$?
        fi
        ;;
  status)
        status exim
        RETVAL=$?
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|condrestart|status}"
        exit 1
esac


exit $RETVAL



___________________________________________________________________

The contents of this e-mail may be privileged and are confidential.
It may not be disclosed to or used by anyone other than the
addressee(s), nor copied in any way. Any views or opinions
presented are solely those of the author and do not necessarily
represent those of Knowledge Limited.

If received in error, please advise the sender, then delete it from
your system.
___________________________________________________________________