Hi all,

Sorry for the long post.
I come back to you with my thoughts on what I think is an issue in the dkimproxy package.
In file /etc/default/dkimproxy, it is mentioned:
# If a variable is unset or set to an empty value, the corresponding argument will be omitted from
# the dkimproxy command line, and dkimproxy is free to read a value from its
# own configuration file or use its own default value.

Maybe I did it wrong, but I could not manage to unset some variables.
For me, once the dkimproxy daemon script reads the /etc/default/dkimproxy file,
if for example the DKIMPROXY_OUT_PRIVKEY is not specified or is set to '',
the dkimproxy will set the location of the key to default:
/var/lib/dkimproxy/private.key
And the script will ignore the /etc/dkimproxy/dkimproxy_out.conf or sender_map.
For me, this is an issue.

I think that, if the script /usr/sbin/dkimproxy.out was written with a lot of options and the possibility to specify (in command line options) the selector, the key location, the type of signature etc., it is more for trials purpose. Then for a "normal" use of the dkimproxy.out (run as a daemon), the configuration should be set in files:
/etc/dkimproxy/dkimproxy_out.conf or/and sender_map.

So there is not point, at the /etc/init.d/dkimproxy script level, to offer some of the options. We should have there, only the options that are not available in other config files.
Such as RUN_DKIMPROXY_OUT, DKIMPROXY_OUT_MIN_SERVERS, user or group.
But options such as DKIMPROXY_OUT_PRIVKEY should not be specified in this file, as it will then take precedence on the /etc/dkimproxy/dkimproxy_out.conf and sender_map files, are less flexible
than in the sender_map file and just add confusion.

I have worked on a new version of the dkimproxy daemon script present in /etc/init.d/
and the associated config file /etc/default/dkimproxy
For backward compatibility, I have tried to find a solution allowing to leave the confusing  'DKIMPROXY_OUT_PRIVKEY ' parameter but it doesn seem possible. So I think this confiusing parameter could simply be removed from
the /etc/default/dkimproxy file.
In my daemon script, I have also added the command "service dkimproxy status"
Here are my versions of the files; Maybe they will be useful to others:

- /etc/default/dkimproxy:
####################################################################
####################################################################
### Default configuration for dkimproxy.
####################################################################
####################################################################

## The following variables specify configuration to be passed as arguments to
## the dkimproxy daemons. If a variable is commented out, the default value
## within the /etc/init.d/dkimproxy script will be used.
## For more details about dkimproxy parameters, please use:
## /usr/sbin/dkimproxy.out --help and
## /usr/sbin/dkimproxy.in  --help
## Variables in Section1 have no risk to conflict with variables specified
## in other config files dkimproxy_in.conf and sender_map.
## Variables in Section2 are now obsolete and will be ignored by the
## /etc/init.d/dkimproxy script.

####################################################################
## SECTION 1
####################################################################
#
## which daemons would be run; anything other than '1' will disable a daemon
## default: 1
RUN_DKIMPROXY_OUT=1
RUN_DKIMPROXY_IN=0

## configuration file to use for dkimproxy.in
## default: "/etc/dkimproxy/dkimproxy_in.conf"
#DKIMPROXY_IN_CONF="/etc/dkimproxy/dkimproxy_in.conf"

## configuration file to use for dkimproxy.out
## default: "/etc/dkimproxy/dkimproxy_out.conf"
#DKIMPROXY_OUT_CONF="/etc/dkimproxy/dkimproxy_out.conf"

## Number of pre-forked process that dkimproxy should keep ready for action.
## The best value for performances is 5 on a single core server. It would
## seem reasonable to add at least one process per core on your server.
## Each process will take about 2MB of RAM, so with a value of 2 for both
## the in and the out daemon, dkimproxy will use 10/12 MB of RAM.
## default: 5
#DKIMPROXY_IN_MIN_SERVERS=5
DKIMPROXY_OUT_MIN_SERVERS=4

## user and group of the dkimproxy daemons
## default user: dkimproxy
## default group: dkimproxy
DKIMPROXYUSER=dkimproxy
DKIMPROXYGROUP=email

## HOSTNAME
## Is used by the DKIM IN PROXY
## hostname for verification "Authentication-Results" header
## Feel free to use hostname -f if that fits you, but then make
## sure that your DNS dkim key entry is setup accordingly with
## something like _domainkey.mx.example.com
## default: `hostname -d`
#DKIM_HOSTNAME=<myHostname>

## DOMAIN
## Is used by the DKIM OUT PROXY
## Specifies the domains to sign for; specify multiple domains separated by commas
## This variable is overwriten by domain specified in dkimproxy_out.conf
## or in sender_map files.
## default: `hostname -d` and domains parsed from /var/lib/dtc/etc/local_domains
#DOMAIN=<myDomain1>,<myDomain2>
#
####################################################################
## SECTION 2
####################################################################
## Parameters in Section2 are redundant with parameters set in dkimproxy_out.conf
## or in sender_map files; Thus adding confusions.
## They are now obsolete and will be ignored by the /etc/init.d/dkimproxy script.
##
## private key to use for signing
## default: "/var/lib/dkimproxy/private.key"
## DKIMPROXY_OUT_PRIVKEY="/var/lib/dkimproxy/private.key"
##

- /etc/init.d/dkimproxy:

#!/bin/sh
#
# Copyright (C) 2005 Messiah College.
# Copyright (C) 2008 Thomas Goirand <tho...@goirand.fr>

### BEGIN INIT INFO
# Provides:        dkimproxy
# Required-Start:    $local_fs $remote_fs
# Required-Stop:    $local_fs $remote_fs
# Default-Start:    2 3 4 5
# Default-Stop:        0 1 6
# Short-Description:    Domain key filter init script
# Description:        dkimproxy is an SMTP-proxy designed for Postfix. It
#                       implements DKIM message signing and verification.
#                       It comprises two separate filters, an "outbound" filter #                       for signing outgoing email, and an "inbound" filter for #                       verifying signatures of incoming email. The filters can #                       operate as either Before-Queue or After-Queue Postfix
#                       content filters.
### END INIT INFO

#VERBOSE_MODE=1
VERBOSE_MODE=0

. /lib/lsb/init-functions

if [ "${VERBOSE_MODE}" -eq 1 ] ; then
    log_daemon_msg "Reading parameters..."
fi

if [ -e /etc/default/dkimproxy ] ; then
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> Found the Daemon config file: /etc/default/dkimproxy"
    fi
    . /etc/default/dkimproxy
fi

### START OF CONFIGURATION READINGS FROM /etc/default/dkimproxy ###
# Check if dkimproxy in or out has been disabled
RUN_DKOUT=1
RUN_DKIN=1
if [ -n "${RUN_DKIMPROXY_OUT}" ] ; then
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> RUN value for the OUTBOUND Proxy in Daemon Config file: $RUN_DKIMPROXY_OUT"
    fi
    if ! [ ${RUN_DKIMPROXY_OUT} -eq 1 ] ; then
        RUN_DKOUT=0
    fi
else
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> RUN value for the OUTBOUND Proxy is set to default value: $RUN_DKOUT"
    fi
fi
if [ -n "${RUN_DKIMPROXY_IN}" ] ; then
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> RUN value for the INBOUND  Proxy in Daemon Config file: $RUN_DKIMPROXY_IN"
    fi
    if ! [ "${RUN_DKIMPROXY_IN}" -eq 1 ] ; then
        RUN_DKIN=0
    fi
else
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> RUN value for the INBOUND  Proxy is set to default value: $RUN_DKIN"
    fi
fi

# Check if the path to dkimproxy in or out has been overwritten
DKIN_CONF=/etc/dkimproxy/dkimproxy_in.conf
DKOUT_CONF=/etc/dkimproxy/dkimproxy_out.conf
if [ -n "${DKIMPROXY_IN_CONF}" ] ; then
    DKIN_CONF=${DKIMPROXY_IN_CONF}
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> INBOUND  Proxy config file location in Daemon Config file: $DKIMPROXY_IN_CONF"
    fi
else
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The INBOUND  Proxy config file location is set to default value: $DKIN_CONF"
    fi
fi

if [ -n "${DKIMPROXY_OUT_CONF}" ] ; then
    DKOUT_CONF=${DKIMPROXY_OUT_CONF}
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> OUTBOUND Proxy config file location in Daemon Config file: $DKIMPROXY_OUT_CONF"
    fi
else
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The OUTBOUND Proxy config file location is set to default value: $DKOUT_CONF"
    fi
fi

# Check if dkimproxy_in.conf config file actually exists.
# If not then exit 1.

if [ -e "${DKIN_CONF}" ] ; then
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The dkimproxy.in config file exists: $DKIN_CONF"
      echo "      Parameters will be taken from the dkimproxy.in config file."
    fi
else
    if [ "${RUN_DKIN}" -eq 1 ] ; then
      echo "ERROR - File $DKIN_CONF does not exist!"
      exit 1
    fi
fi

# Check if dkimproxy_out.conf config file actually exists.
# If not then exit 1.

if [ -e "${DKOUT_CONF}" ] ; then
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The dkimproxy.out config file exists: $DKOUT_CONF"
      echo "      Parameters (key location, domain, selector, etc.) will be taken from the dkimproxy.out or sender_map config files."
    fi
else
    if [ "${RUN_DKOUT}" -eq 1 ] ; then
      echo "ERROR - File $DKOUT_CONF does not exist!"
      exit 1
    fi
fi

# Set the default number of process to prefork.
if [ -z "${DKIMPROXY_IN_MIN_SERVERS}" ] ; then
    DKIMPROXY_IN_MIN_SERVERS=5
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The INBOUND  Proxy Minimum number of servers is set to default value: $DKIMPROXY_IN_MIN_SERVERS"
    fi
else
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The INBOUND  Proxy Minimum number of servers in the Daemon Config file: $DKIMPROXY_IN_MIN_SERVERS"
    fi
fi

if [ -z "${DKIMPROXY_OUT_MIN_SERVERS}" ] ; then
    DKIMPROXY_OUT_MIN_SERVERS=5
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The OUTBOUND Proxy Minimum number of servers is set to default value: $DKIMPROXY_OUT_MIN_SERVERS"
    fi
else
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The OUTBOUND Proxy Minimum number of servers in the Daemon Config file: $DKIMPROXY_OUT_MIN_SERVERS"
    fi
fi

# Configure usernames to run under
if [ -z "${DKIMPROXYUSER}" ] ; then
    DKIMPROXYUSER=dkimproxy
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The Proxy User is set to default value: $DKIMPROXYUSER"
    fi
else
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The Proxy User in the Daemon Config file: $DKIMPROXYUSER"
    fi
fi

# Configure the group to run under
if [ -z "${DKIMPROXYGROUP}" ] ; then
    DKIMPROXYGROUP=dkimproxy
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The Proxy Group is set to default value: $DKIMPROXYGROUP"
    fi
else
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The Proxy Group in the Daemon Config file: $DKIMPROXYGROUP"
    fi
fi

# Check if the path to the hostname has been overwritten
# In fact, if no value, then set the default...
if [ -z "${DKIM_HOSTNAME}" ] ; then
    DKIM_HOSTNAME=`hostname -d`
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> The Dkim hostname is set to default value hostname -d => $DKIM_HOSTNAME"
    fi
else
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
      echo "   -> Dkim Hostname in the Daemon Config file: $DKIM_HOSTNAME"
    fi
fi

if [ -z "${DKIM_HOSTNAME}" ] ; then
    echo 'Warning: no domain name from `hostname -d`, using "localdomain".'
    DKIM_HOSTNAME=localdomain
fi

# Get the host domains dynamically. You can change this to the location where # you have your virtual table here, or best: ehance this script to support more
# situations with packages others than DTC
HOST_DOMAIN=${DKIM_HOSTNAME}
if [ -z "${DOMAIN}" ] ; then
    if [ -f /var/lib/dtc/etc/local_domains ] ; then
        DTC_DOMAIN=`cat /var/lib/dtc/etc/local_domains | grep -v ^${HOST_DOMAIN} | tr \\\r\\\n ,,`
        if [ "${VERBOSE_MODE}" -eq 1 ] ; then
            echo "   -> The DTC Domain is set to: $DTC_DOMAIN"
        fi
    else
        DTC_DOMAIN=""
        if [ "${VERBOSE_MODE}" -eq 1 ] ; then
            echo "   -> The DTC Domain is set to: ''"
        fi
    fi
    DOMAIN=${DTC_DOMAIN}${HOST_DOMAIN}
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
        echo "   -> The Domain is set to: $DOMAIN"
    fi
else
    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
        echo "   -> Host Domains in the Daemon config file: $DOMAIN."
    fi
fi

# Private key location is now obsolete in this config file.
###########################################################
# Check if the path to the private key has been overwritten
# In fact, if no value, then set the default...
#if [ -z "${DKIMPROXY_OUT_PRIVKEY}" ] ; then
#    DKIMPROXY_OUT_PRIVKEY="/var/lib/dkimproxy/private.key"
#    if [ "${VERBOSE_MODE}" -eq 1 ] ; then
#      echo "- Set PRIVATE KEY location to default: $DKIMPROXY_OUT_PRIVKEY"
#    fi
#else
#    echo "- Found PRIVATE KEY location: $DKIMPROXY_OUT_PRIVKEY in default config file."
#fi

### END OF CONFIGURATION READINGS FROM /etc/default/dkimproxy ###

DKIMPROXY_IN_BIN="/usr/sbin/dkimproxy.in"
DKIMPROXY_OUT_BIN="/usr/sbin/dkimproxy.out"
PIDDKIMPROXY_IN="/var/run/dkimproxy.in"
PIDDKIMPROXY_OUT="/var/run/dkimproxy.out"

COMMON_ARGS="--user=${DKIMPROXYUSER} --group=${DKIMPROXYGROUP} --daemonize"
DKIMPROXY_IN_ARGS="--hostname=${DKIM_HOSTNAME} --conf_file=${DKIN_CONF} ${COMMON_ARGS} --pidfile=${PIDDKIMPROXY_IN} --min_servers=${DKIMPROXY_IN_MIN_SERVERS}" #DKIMPROXY_OUT_ARGS="--domain=${DOMAIN} --method=simple --conf_file=${DKOUT_CONF} --keyfile=${DKIMPROXY_OUT_PRIVKEY} ${COMMON_ARGS} --pidfile=${PIDDKIMPROXY_OUT} --signature=dkim --signature=domainkeys --min_servers=${DKIMPROXY_OUT_MIN_SERVERS}"

DKIMPROXY_OUT_ARGS="--domain=${DOMAIN} --method=simple --conf_file=${DKOUT_CONF}  ${COMMON_ARGS} --pidfile=${PIDDKIMPROXY_OUT} --min_servers=${DKIMPROXY_OUT_MIN_SERVERS}"

if [ -x /sbin/start-stop-daemon ] ; then
    STRT_STP_DMN=/sbin/start-stop-daemon
else
    STRT_STP_DMN=`which start-stop-daemon`
fi
if [ -z "${STRT_STP_DMN}" ] ; then
    echo "Can't find the start-stop-daemon binary"
fi

case "$1" in
start)
    START_ERROR=0
    RETVAL=0
    if [ -x ${DKIMPROXY_IN_BIN} ] ; then
        if [ "${RUN_DKIN}" -eq 1 ] ; then
            log_daemon_msg "Starting inbound DomainKeys-filter" "dkimproxy.in"
            #echo "${DKIMPROXY_IN_BIN} ${DKIMPROXY_IN_ARGS}"
            ${DKIMPROXY_IN_BIN} ${DKIMPROXY_IN_ARGS}
            RETVAL=$?
            START_ERROR=${RETVAL}
            log_end_msg ${RETVAL}
            if ! [ "${RETVAL}" -eq 0 ] ; then
                exit ${RETVAL}
            fi
            echo "   -> Launched application: $DKIMPROXY_IN_BIN"
            if [ -f "${PIDDKIMPROXY_IN}" ] ; then
                MYINPID=`cat ${PIDDKIMPROXY_IN}`
                echo "   -> A PID file for INBOUND  proxy was created - PID:$MYINPID"
            fi
        else
            echo "   -> The DKIM INBOUND  Proxy is disabled in /etc/default/dkimproxy"
        fi
    fi

    if [ -x ${DKIMPROXY_OUT_BIN} ] ; then
        if [ "${RUN_DKOUT}" -eq 1 ] ; then
            log_daemon_msg "Starting outbound DomainKeys-signing" "dkimproxy.out"
            #echo ${DKIMPROXY_OUT_BIN} ${DKIMPROXY_OUT_ARGS}
            ${DKIMPROXY_OUT_BIN} ${DKIMPROXY_OUT_ARGS}
            #${STRT_STP_DMN} --background --make-pidfile --start -p ${PIDDKIMPROXY_OUT} -u ${DKIMPROXYUSER} -g ${DKIMPROXYGROUP} -x ${DKIMPROXY_OUT_BIN} -- ${DKIMPROXY_OUT_ARGS}
            RETVAL=$?
            log_end_msg ${RETVAL}
            if [ "${RETVAL}" -eq 0 ] ; then
                echo "   -> Launched application: $DKIMPROXY_OUT_BIN"
                if [ -f "${PIDDKIMPROXY_OUT}" ] ; then
                    MYOUTPID=`cat ${PIDDKIMPROXY_OUT}`
                    echo "   -> A PID file for OUTBOUND proxy was created - PID:$MYOUTPID"
                fi
            fi
        else
            echo "   -> The DKIM OUTBOUND Proxy is disabled in /etc/default/dkimproxy"
        fi
    fi
    if ! [ "${RETVAL}" -eq 0 -a "${START_ERROR}" -eq 0 ] ; then
        if ! [ ${START_ERROR} -eq 0 ] ; then
            echo "Error ${START_ERROR} when starting ${DKIMPROXY_IN_BIN}"
        fi
        if ! [ "${RETVAL}" -eq 0 ] ; then
            echo "Error ${RETVAL} when starting ${DKIMPROXY_OUT_BIN}"
        fi
    fi
    ;;
stop)
    RETVALIN=0
    RETVALOUT=0
    MYPID=0
    if [ -x ${DKIMPROXY_IN_BIN} ] ; then
        if [ "${RUN_DKIN}" -eq 1 ] ; then
            log_daemon_msg "Shutting down inbound DomainKeys-filter" "dkimproxy.in"
            if [ -f "${PIDDKIMPROXY_IN}" ] ; then
                MYPID=`cat ${PIDDKIMPROXY_IN}`
                if [ "${VERBOSE_MODE}" -eq 1 ] ; then
                    echo "   -> Found a PID file for INBOUND proxy - PID:$PID."
                fi
                kill $MYPID
                RETVALIN=$?
            else
                echo -n " ${PIDDKIMPROXY_IN} not found "
                RETVALIN=1
            fi
            log_end_msg ${RETVALIN}
        else
            echo "   -> The DKIM INBOUND  Proxy is disabled in /etc/default/dkimproxy"
        fi
    fi
    if [ -x ${DKIMPROXY_OUT_BIN} ] ; then
        if [ "${RUN_DKOUT}" -eq 1 ] ; then
            log_daemon_msg "Shutting down outbound DomainKeys-filter" "dkimproxy.out"
            if [ -f "${PIDDKIMPROXY_OUT}" ] ; then
                MYPID=`cat ${PIDDKIMPROXY_OUT}`
                if [ "${VERBOSE_MODE}" -eq 1 ] ; then
                    echo "   -> Found a PID file for OUTBOUND proxy - PID:$PID."
                fi
                kill $MYPID
                RETVALOUT=$?
            else
                echo -n " ${PIDDKIMPROXY_OUT} not found "
                RETVALOUT=1
            fi
            log_end_msg ${RETVALOUT}
        else
            echo "   -> The DKIM OUTBOUND Proxy is disabled in /etc/default/dkimproxy"
        fi
    fi
    rm -f "${PIDDKIMPROXY_IN}" "${PIDDKIMPROXY_OUT}"
    if ! [ ${RETVALIN} -eq 0 -a ${RETVALOUT} -eq 0 ]; then
        if ! [ ${RETVALIN} -eq 0 ] ; then
            echo "Error ${RETVALIN} when shutting down ${PIDDKIMPROXY_IN}"
        fi
        if ! [ "${RETVALOUT}" -eq 0 ] ; then
            echo "Error ${RETVALOUT} when shutting down ${PIDDKIMPROXY_OUT}"
        fi
    fi
    ;;
status)
    # For Inbound
    if [ "${RUN_DKIN}" -eq 1 ] ; then
        MYINPIDFILE=0
        MYINPID=''
        log_daemon_msg "Auditing system dkimproxy.in Daemons:"
        if [ -f "${PIDDKIMPROXY_IN}" ] ; then
            MYINPID=`cat ${PIDDKIMPROXY_IN}`
            echo "   -> Found a PID file for INBOUND  proxy - PID:$MYINPID"
            MYINPIDFILE=1
        else
            echo "   -> No IN PID file in /var/run"
        fi
        NUMBER_PROCESS_IN=`ps -ef | grep dkimproxy.in | grep -v grep | wc -l`         echo "   -> Number of process running for INBOUND  proxy: $NUMBER_PROCESS_IN"
        if [ "${MYINPIDFILE}" -eq 0 ] ; then
            if [ "${NUMBER_PROCESS_IN}" -ne 0 ] ; then
                echo "   -> Inconsistency warning: No PID file but processes running!"
                log_end_msg 1
            else
                log_end_msg 1
            fi
        else
            if [ "${NUMBER_PROCESS_IN}" -eq 0 ] ; then
                echo "   -> Inconsistency warning: PID file present but no processes running!"
                rm -f "${PIDDKIMPROXY_IN}"
                echo "   -> Zombi file has been cleared."
                log_end_msg 1
            elif [ "${NUMBER_PROCESS_IN}" -lt "${DKIMPROXY_IN_MIN_SERVERS}" ] ; then
                echo "   -> Warning: Not enough processes found!"
                log_end_msg 1
            else
                log_end_msg 0
            fi
        fi
    fi

    # For Outbound
    if [ "${RUN_DKOUT}" -eq 1 ] ; then
        MYOUTPIDFILE=0
        MYOUTPID=''
        log_daemon_msg "Auditing system dkimproxy.out Daemons:"
        if [ -f "${PIDDKIMPROXY_OUT}" ] ; then
            MYOUTPID=`cat ${PIDDKIMPROXY_OUT}`
            echo "   -> Found a PID file for OUTBOUND proxy - PID:$MYOUTPID"
            MYOUTPIDFILE=1
        else
            echo "   -> No OUT PID file in /var/run"
        fi
        NUMBER_PROCESS_OUT=`ps -ef | grep dkimproxy.out | grep -v grep | wc -l`         echo "   -> Number of process running for OUTBOUND proxy: $NUMBER_PROCESS_OUT"
        if [ "${MYOUTPIDFILE}" -eq 0 ] ; then
            if [ "${NUMBER_PROCESS_OUT}" -ne 0 ] ; then
                echo "   -> Inconsistency warning: No PID file but processes running!"
                log_end_msg 1
            else
                log_end_msg 1
            fi
        else
            if [ "${NUMBER_PROCESS_OUT}" -eq 0 ] ; then
                echo "   -> Inconsistency warning: PID file present but no processes running!"
                rm -f "${PIDDKIMPROXY_OUT}"
                echo "   -> Zombi file has been cleared."
                log_end_msg 1
            elif [ "${NUMBER_PROCESS_OUT}" -lt "${DKIMPROXY_OUT_MIN_SERVERS}" ] ; then
                echo "   -> Warning: Not enough processes found!"
                log_end_msg 1
            else
                log_end_msg 0
            fi
        fi
    fi
    ;;
force-reload)
    $0 stop
    sleep 1
    $0 start
    ;;
reload)
    $0 stop
    sleep 1
    $0 start
    ;;
restart)
    $0 stop
    sleep 1
    $0 start
    ;;
*)
    echo "Usage: $0 {start|stop|restart|status}"
    exit 1
    ;;
esac

exit 0

####################################################
##  END of file /etc/init.d/dkimproxy
####################################################

Best regards,

    Erlé

Reply via email to