aboutsummaryrefslogtreecommitdiffstats
path: root/security/clamav
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2007-06-05 22:22:46 +0800
committergarga <garga@FreeBSD.org>2007-06-05 22:22:46 +0800
commitea236b22ab8c27c9cef5dee8b6fb121a62b6111c (patch)
tree73a005a97bc17170fe615f5fd0646c50fac46783 /security/clamav
parent89db3b00476e657250da6dec55a59ed1b7f9b3a6 (diff)
downloadfreebsd-ports-gnome-ea236b22ab8c27c9cef5dee8b6fb121a62b6111c.tar.gz
freebsd-ports-gnome-ea236b22ab8c27c9cef5dee8b6fb121a62b6111c.tar.zst
freebsd-ports-gnome-ea236b22ab8c27c9cef5dee8b6fb121a62b6111c.zip
- Change clamav-milter rc.d script, now it just wait for clamd socket if
clamav_clamd_enable is set. PR: ports/111545 Submitted by: Craig Leres <leres@ee.lbl.gov>
Diffstat (limited to 'security/clamav')
-rw-r--r--security/clamav/files/clamav-milter.in34
1 files changed, 19 insertions, 15 deletions
diff --git a/security/clamav/files/clamav-milter.in b/security/clamav/files/clamav-milter.in
index c43201c3549a..eed56b4e4b5c 100644
--- a/security/clamav/files/clamav-milter.in
+++ b/security/clamav/files/clamav-milter.in
@@ -36,21 +36,23 @@ start_precmd()
fi
rc_flags="--pidfile ${pidfile} ${flags:-$clamav_milter_flags} $clamav_milter_socket"
- echo -n "Waiting for clamd socket.. "
- i=${clamav_milter_socktimeout}
- while [ $i -ne 0 ]
- do
- [ -S "$clamav_clamd_socket" ] && break
- if [ `expr $i % 10` -eq 0 ]; then
- echo -n "${i}.. "
+ if checkyesno clamav_clamd_enable; then
+ echo -n "Waiting for clamd socket.. "
+ i=${clamav_milter_socktimeout}
+ while [ $i -ne 0 ]
+ do
+ [ -S "$clamav_clamd_socket" ] && break
+ if [ `expr $i % 10` -eq 0 ]; then
+ echo -n "${i}.. "
+ fi
+ sleep 1
+ i=$(($i-1))
+ done
+ echo
+ if [ $i -eq 0 ]; then
+ echo "There is no clamd socket (${clamav_clamd_socket})!"
+ exit 1
fi
- sleep 1
- i=$(($i-1))
- done
- echo
- if [ $i -eq 0 ]; then
- echo "There is no clamd socket (${clamav_clamd_socket})!"
- exit 1
fi
}
@@ -58,8 +60,10 @@ start_precmd()
load_rc_config $name
: ${clamav_milter_enable="NO"}
: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
-: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
: ${clamav_milter_flags="--postmaster-only --local --outgoing --timeout=0 --max-children=50"}
: ${clamav_milter_socktimeout="60"}
+: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
+: ${clamav_clamd_enable="NO"}
+
run_rc_command "$1"