aboutsummaryrefslogtreecommitdiff
path: root/security/clamav
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2003-10-25 20:52:32 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2003-10-25 20:52:32 +0000
commit0f72f48cd64e20bf0bbaa1d29337f6208af5afbc (patch)
tree63cc5ba45603846322be3a561a35ed1c2c38b486 /security/clamav
parent7c56a187a14bdfa93a8e99e775c279a2791c396f (diff)
Notes
Diffstat (limited to 'security/clamav')
-rw-r--r--security/clamav/Makefile10
-rw-r--r--security/clamav/files/clamd.sh11
2 files changed, 19 insertions, 2 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index 114099fcde47..b02ff2a09303 100644
--- a/security/clamav/Makefile
+++ b/security/clamav/Makefile
@@ -7,7 +7,7 @@
PORTNAME= clamav
PORTVERSION= 0.60
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= clamav
@@ -40,8 +40,13 @@ MAN1= clamscan.1 freshclam.1 sigtool.1 clamdscan.1 clamav-milter.1
MAN5= clamav.conf.5
MAN8= clamd.8
+CLAMD_SOCKET?= /var/run/clamav/clamd
+
+CONFLICTS= clamav-devel-*
+
SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
- -e 's|%%DATADIR%%|${DATADIR}|g'
+ -e 's|%%DATADIR%%|${DATADIR}|g' \
+ -e 's|%%CLAMD_SOCKET%%|${CLAMD_SOCKET}|g'
SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \
-e 's|^\#?(LogFile) .*$$|\1 /var/log/clamav/clamd.log|' \
@@ -69,6 +74,7 @@ LDFLAGS+= -lcipher
.endif
.if defined(WITH_MILTER)
+USE_GETOPT_LONG= yes
CONFIGURE_ARGS+= --enable-milter
PLIST_SUB+= CLAMAV-MILTER=""
.else
diff --git a/security/clamav/files/clamd.sh b/security/clamav/files/clamd.sh
index 3254acb2a0cb..9a5fe99cb911 100644
--- a/security/clamav/files/clamd.sh
+++ b/security/clamav/files/clamd.sh
@@ -26,6 +26,16 @@ pidfile=/var/run/clamav/clamd.pid
required_dirs=%%DATADIR%%
required_files=%%PREFIX%%/etc/clamav.conf
+start_precmd=start_precmd
+
+start_precmd()
+{
+ if [ -S "$clamd_socket" ]; then
+ warn "Stale socket $clamd_socket removed."
+ rm "$clamd_socket"
+ fi
+}
+
stop_postcmd=stop_postcmd
stop_postcmd()
@@ -37,6 +47,7 @@ stop_postcmd()
clamd_enable=${clamd_enable:-"NO"}
clamd_flags=${clamd_flags:-""}
+clamd_socket=${clamd_socket:-"%%CLAMD_SOCKET%%"}
load_rc_config $name
run_rc_command "$1"