Bug 61966

Summary: clamav: Extra rc file to start freshclam
Product: Ports & Packages Reporter: rand
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description rand 2004-01-26 21:10:17 UTC
	We use freshclam to keep our AV DB up to date, and there isn't a
	method of having it start automatically in the current port.

Fix: 

Here is a clamav-freshclam.sh script for rc.d:


#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: freshclam
# REQUIRE: LOGIN
# BEFORE: mail
# KEYWORD: FreeBSD shutdown

#
# Add the following lines to /etc/rc.conf to enable clamd:
#
#clamav_freshclam_enable="YES"
#
# See freshclam(8) for flags
#

. /usr/local/etc/rc.subr

name=clamav_freshclam
rcvar=`set_rcvar`

command=/usr/local/bin/freshclam
command_args="--daemon"
required_dirs=/usr/local/share/clamav

# set defaults

clamav_freshclam_enable=${clamav_clamd_enable:-"NO"}
clamav_freshclam_flags=${clamav_clamd_flags:-"--checks=18 --log=/var/log/freshclam.log"}

load_rc_config $name
run_rc_command "$1"
How-To-Repeat: 	install the port.   ;)
Comment 1 Greg Lewis freebsd_committer freebsd_triage 2004-02-03 06:46:50 UTC
State Changed
From-To: open->closed

Thanks!  I committed an RC script based on the one you submitted.