pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/clamsmtp Added clamsmtpd_maxwait (default is 600 ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/79848e07336a
branches: trunk
changeset: 530011:79848e07336a
user: martti <martti%pkgsrc.org@localhost>
date: Fri Jun 15 09:47:06 2007 +0000
description:
Added clamsmtpd_maxwait (default is 600 seconds). This makes it possible
to define how long clamsmtpd should wait for clamd.
PKGREVISION++
diffstat:
mail/clamsmtp/Makefile | 4 ++--
mail/clamsmtp/files/clamsmtpd.sh | 17 ++++++++---------
2 files changed, 10 insertions(+), 11 deletions(-)
diffs (60 lines):
diff -r 1c63707655c9 -r 79848e07336a mail/clamsmtp/Makefile
--- a/mail/clamsmtp/Makefile Fri Jun 15 08:56:35 2007 +0000
+++ b/mail/clamsmtp/Makefile Fri Jun 15 09:47:06 2007 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.31 2007/06/04 12:55:48 martti Exp $
+# $NetBSD: Makefile,v 1.32 2007/06/15 09:47:06 martti Exp $
DISTNAME= clamsmtp-1.8
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= mail
MASTER_SITES= http://memberwebs.com/nielsen/software/clamsmtp/
diff -r 1c63707655c9 -r 79848e07336a mail/clamsmtp/files/clamsmtpd.sh
--- a/mail/clamsmtp/files/clamsmtpd.sh Fri Jun 15 08:56:35 2007 +0000
+++ b/mail/clamsmtp/files/clamsmtpd.sh Fri Jun 15 09:47:06 2007 +0000
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: clamsmtpd.sh,v 1.7 2007/06/04 12:55:48 martti Exp $
+# $NetBSD: clamsmtpd.sh,v 1.8 2007/06/15 09:47:06 martti Exp $
#
# PROVIDE: clamsmtpd
# REQUIRE: LOGIN clamd
@@ -13,9 +13,10 @@
#
# The following variables are optional:
#
-# clamsmtpd_user="@CLAMAV_USER@" # user to run clamsmtpd as
+# clamsmtpd_maxwait="600" # max wait time for clamd
+# clamsmtpd_user="@CLAMAV_USER@" # user to run clamsmtpd as
# clamsmtpd_addr="localhost:10026" # address to forward mail to;
-# # see clamsmtpd(8).
+# # see clamsmtpd(8).
#
if [ -f /etc/rc.subr ]; then
@@ -42,18 +43,16 @@
: ${socket="/tmp/clamd"}
: ${clamsmtpd_user="@CLAMAV_USER@"}
fi
+: ${clamsmtpd_maxwait="600"}
clamsmtpd_prestart()
{
if [ ! -S "${socket}" ]; then
- # Max wait time is 2 minutes
- retries=11
-
- @ECHO@ -n "Waiting for clamd to become ready"
- while [ ${retries} -gt 0 -a ! -S "${socket}" ]; do
+ @ECHO@ -n "Waiting max ${clamsmtpd_maxwait} seconds for clamd to become ready"
+ while [ ${clamsmtpd_maxwait} -gt 0 -a ! -S "${socket}" ]; do
@ECHO@ -n "."
sleep 10
- retries=$((retries - 1))
+ clamsmtpd_maxwait=$((clamsmtpd_maxwait - 10))
done
if [ ! -S "${socket}" ]; then
@ECHO@ ""
Home |
Main Index |
Thread Index |
Old Index