summaryrefslogtreecommitdiff
path: root/mail/clamsmtp
diff options
context:
space:
mode:
authormartti <martti@pkgsrc.org>2007-06-15 09:47:06 +0000
committermartti <martti@pkgsrc.org>2007-06-15 09:47:06 +0000
commit302551e0429f5693c6f5e85afdeebd2bc7cfddc5 (patch)
treed051a88973de4bb74b0d58a1e8c83cd3b058cfce /mail/clamsmtp
parent918ae9b5b6bb9a23a281aa1d5f4d56e07cbe3099 (diff)
downloadpkgsrc-302551e0429f5693c6f5e85afdeebd2bc7cfddc5.tar.gz
Added clamsmtpd_maxwait (default is 600 seconds). This makes it possible
to define how long clamsmtpd should wait for clamd. PKGREVISION++
Diffstat (limited to 'mail/clamsmtp')
-rw-r--r--mail/clamsmtp/Makefile4
-rw-r--r--mail/clamsmtp/files/clamsmtpd.sh17
2 files changed, 10 insertions, 11 deletions
diff --git a/mail/clamsmtp/Makefile b/mail/clamsmtp/Makefile
index a9b027e34d6..7a5c5221b1c 100644
--- a/mail/clamsmtp/Makefile
+++ b/mail/clamsmtp/Makefile
@@ -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 --git a/mail/clamsmtp/files/clamsmtpd.sh b/mail/clamsmtp/files/clamsmtpd.sh
index 804a690dbfc..6855eea5f0a 100644
--- a/mail/clamsmtp/files/clamsmtpd.sh
+++ b/mail/clamsmtp/files/clamsmtpd.sh
@@ -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 @@ else
: ${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@ ""