-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey, I went through the trouble of making a config and init script for
Gentoo that can start and stop single sign/verify or seperate
sign/verify processes.  If it can be useful somewhere, please do.  I
give it to you freely.

Requirements:
1) /etc/conf.d/dkim-milter sets two variables.
  START_DKIM_MILTER="yes"
and
  DKIM_MILTER_CONF="/path/to/conf1 /path/to/conf2"

2) Each conf file must specify the PIDFile setting.  My init script
doesn't do any error checking or set defaults if it's not found, so it
will error out with some error message that doesn't tell you what the
problem is :-)  Should be easy to add.



====  /etc/conf.d/dkim-milter: 
START_DKIM_MILTER="yes"
DKIM_MILTER_CONF="/etc/mail/dkim-milter-sign.conf 
/etc/mail/dkim-milter-verify.conf"

==== /etc/init.d/dkim-milter:
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

depend() {
        need net
        use logger
        before sendmail
}

start() {
        if [ "${START_DKIM_MILTER}" = "yes" ]; then
                for DKIM in ${DKIM_MILTER_CONF}; do
                        PIDFILE=`egrep -i "^PIDFile" ${DKIM} | tail -n 1 | awk 
'{print $2}'`
                        ebegin "Starting dkim-milter: `basename ${DKIM}`"
                        start-stop-daemon --start \
                                --pidfile ${PIDFILE}  \
                                --exec /usr/bin/dkim-filter -- \
                                -x ${DKIM}
                        eend $? "Failed to start dkim-milter"
                done
        fi
}

stop() {
        if [ "${START_DKIM_MILTER}" = "yes" ]; then
                ebegin "Stopping dkim-milter"
                # Added --retry 5 to make it wait for daemon to die
                start-stop-daemon --stop --quiet --retry 5 --name dkim-filter
                eend $? "Failed to stop dkim-milter"
        fi
}

- -- 
Regards...              Todd
   A friend of mine was at the military and had to check new recruits for
color-blindness. Only after the 20th color-blind man in a row he realized
for the first time in hist life that it was _him_, being the color-blind.
                                                    --Johannes Schindelin
Linux kernel 2.6.17-6mdv   load average: 0.02, 0.02, 0.03
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGlqq/Y2VBGxIDMLwRArWRAKCDCTQcXqgxWt+MRqz99htPPCW8VgCfUTRR
YkOdk1hbaAXSVqQDSWOB+j4=
=VkV6
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
dkim-milter-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dkim-milter-discuss

Reply via email to