- ensure that an stale clamd socket will be deleted. [1]

- Add conflict with clamav-devel port [2]
- fix milter on STABLE [3]
no response from maintainer

PR:		57379, 58037
Submitted by:	martin@mail.tradex.sk [1], rob@debank.tv [2], dinoex [3]
This commit is contained in:
Dirk Meyer 2003-10-25 20:52:32 +00:00
parent 7c56a187a1
commit 0f72f48cd6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=92138
2 changed files with 19 additions and 2 deletions

View File

@ -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

View File

@ -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"