[prev in list] [next in list] [prev in thread] [next in thread]
List: pgp-keyserver-folk
Subject: [Pgp-keyserver-folk] Re: tight loop in pks-queue-run.sh
From: "Teun Nijssen" <teun.nijssen () UvT ! nl>
Date: 2002-10-22 14:12:14
[Download RAW message or body]
Hi Patrick,
sorry for replying late: I'm still handling backlog from my vacation.
> I do not process the incoming incremental within the sendmail delivery
> process. The mail is only stored within the delivery porocess.
> Another process takes one file after and send them to pksd.
You do it in a simple way; you can do it more fun however. :-)
my pks-mail.sh ends with:
size=`ls -ort $file | awk '{print $4}'`
if [ ${size} -lt 10000 ]
then
exec $bindir/pksdctl $socket "mail $file"
fi
It means of course that small keyrings are handled on the fly as long as there
are threads available in pksd. Longer files are kept in the queue until
pks-queue-run.sh picks them up, small keys first with short intervals, then
large keys with big sleeps in between:
dir=`awk '/mail_dir/ { print $2 }' < $conf`
socket=`awk '/socket_name/ { print $2 }' < $conf`
bindir=`awk '/pks_bin_dir/ { print $2 }' < $conf`
find $dir -type f -size +9999c -exec mv {} /ext1/pks/big \;
delay="$2"
delay2="$3"
# first handle keys retrieved from the SURFnet cservd LDAP server
for file in $dir/pks-mail.key0x*; do
if [ -r "$file" ]; then
$bindir/pksdctl $socket "mail $file"
fi
if [ "${delay}" = "" ]
then
sleep 3
else
sleep "${delay}"
fi
done
# then handle small keys that didn't make it through an overloaded server
for file in $dir/pks-mail.*; do
if [ -r "$file" ]; then
$bindir/pksdctl $socket "mail $file"
fi
if [ "${delay}" = "" ]
then
sleep 5
else
sleep "${delay}"
fi
done
# and finally process the large rings
for file in /ext1/pks/big/*; do
if [ -r "$file" ]; then
$bindir/pksdctl $socket "mail $file"
fi
if [ "${delay2}" = "" ]
then
sleep 11
else
sleep "${delay2}"
fi
done
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic