ASSP:Inicializacao Automatica do ASSP

From Wiki

Utilize o seguinte script para inicializar o ASSP no Linux

#!/bin/sh
# change this to #!/bin/ksh for AIX and Solaris
########################################################################
# RC RunLevel Entry Point
########################################################################
# Start/Stop Script for ASSP on Linux/AIX/Solaris
# 2007 Copyright by Enio Basso, feedback ebasso at ebasso dot net
# You may use and distribute the unmodified version of this script
# Use at your own risk. No implied or specific warranties are given.
# You may change it for your own usage only
# Version 1.0 10.09.2007
########################################################################
# chkconfig: 2345 66 19
# description: ASSP Antispam SMTP Proxy

# Change the location of your assp.pl file

# Start or stop ASSP
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin

case "$1" in

    start)
        echo -n "Starting the Anti-Spam SMTP Proxy"
        cd /opt/assp
        perl assp.pl
    ;;

    stop)
        echo -n "Stopping the Anti-Spam SMTP Proxy"
        kill -9 `ps ax | grep "perl assp.pl" | grep -v grep | awk '{ print $1 }'`
    ;;

    restart)
        $0 stop || true
        $0 start
    ;;

    *)
    echo "Usage: /etc/init.d/assp {start|stop|restart}"
    exit 1
    ;;

esac

exit 0

Procedimento:

1) Vá para o diretório /etc/rc.d/init.d.

2) Crie o arquivo assp, cole o conteúdo acima e salve o arquivo.

Obs.: confirme o local onde você colocou os arquivos do ASSP, no meu caso /opt/assp

3) Adicione aos serviços através do comando

> chkconfig --add assp

Bye


Ver também