All pastes #286266 Raw Edit

Unnamed

public text v1 · immutable
#286266 ·published 2006-12-20 14:55 UTC
rendered paste body
#!/bin/sh

# Source spamd configuration.
. /etc/sysconfig/spamd

if [ "${USE_SA_UPDATE}" == "1" ]; then

    /usr/bin/sa-update
    RETVAL=$?

    if [ $RETVAL -eq 0 ]; then
        /etc/rc.d/init.d/spamd condrestart
    fi

    if [ $RETVAL -eq 1 ]; then
        echo "No new rules was downloaded"
        exit 0
    fi

    if [ $RETVAL -gt 4 ]; then
        echo "There were problems with the updated rules, spamd was not restarted"
        exit 1
    fi

fi