Bug 61966 - clamav: Extra rc file to start freshclam
Summary: clamav: Extra rc file to start freshclam
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-26 21:10 UTC by rand
Modified: 2004-02-03 06:47 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.