Re: [Exim] Startup Shutdown Scripts for Solaris

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Fernando Durango
Data:  
Para: Alex Flores
CC: exim-users
Tópicos Antigos: [Exim] Startup Shutdown Scripts
Assunto: Re: [Exim] Startup Shutdown Scripts for Solaris
On Tue, 2 Mar 2004, Alex Flores wrote:

> Hello All,
>
> Sorry if this question was asked before already but can someone point me to
> some sample startup/shutdown scripts?
>
> I am running Exim 4.30 on Solaris 9.
>
> Thanks,
> Alex


Hello Alex,

Here is what I use under Solaris. Create a new file named
/etc/init.d/exim with the following...
-----
#!/bin/sh

#
# Startup for exim
#
umask 022
PIDFILE="/var/spool/exim/exim-daemon.pid"

# Run as daemon on 25/tcp [YES/NO]
RUNDAEMON="YES"

case "$1" in
'start')
        if [ "X${RUNDAEMON}" = "XYES" ] ; then
            echo "exim starting."
            /usr/local/bin/exim -bd -q15m 1>/dev/console 2>&1 &
        else
            echo "exim NOT started, adjust RUNDAEMON if desired."
        fi
        ;;
'stop')
        PID=`cat $PIDFILE`
        if [ ! -z "$PID" ] ;  then
                echo "killing exim..."
                /usr/bin/kill -9 ${PID} 1>/dev/null 2>&1
        fi
        ;;
*)
        echo "Usage: $0 { start | stop }"
        ;;
esac
exit 0
-----
Then do something like:
chmod 744 /etc/init.d/exim
ln -s /etc/init.d/exim /etc/rc3.d/S99exim


/etc/rc3.d/S99exim start
/etc/rc3.d/S99exim stop

Probably not the best solution, but it works for me.
If anyone has any suggestions for improvement, they
would be much appreciated.

    -F