summaryrefslogtreecommitdiff
path: root/security/clamav/files
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2004-02-03 06:46:21 +0000
committerGreg Lewis <glewis@FreeBSD.org>2004-02-03 06:46:21 +0000
commitdfcb3af5b8f61761317df79fc7f5cffe4a57db09 (patch)
treee91db1c2025f4f6e566f789524685e6fc5534519 /security/clamav/files
parent. Add a pkg-deinstall script telling people how they can get rid of the (diff)
1. Add a freshclam rc.d script to start freshclam so the AV database is
updated periodically. Loosely based on the script in the PR. 2. Reorder some operations in the various Makefile targets. 3. Bump PORTREVISION. PR: 61966 [1] Submitted by: Douglas K. Rand <rand@meridian-enviro.com>
Diffstat (limited to 'security/clamav/files')
-rw-r--r--security/clamav/files/clamav-freshclam.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/security/clamav/files/clamav-freshclam.sh b/security/clamav/files/clamav-freshclam.sh
new file mode 100644
index 000000000000..ea87bd583c50
--- /dev/null
+++ b/security/clamav/files/clamav-freshclam.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: freshclam
+# REQUIRE: LOGIN
+# BEFORE: mail
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable freshclam:
+#
+#clamav_freshclam_enable="YES"
+#
+# See freshclam(8) for flags
+#
+
+. %%RC_SUBR%%
+
+name=clamav_freshclam
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/bin/freshclam
+required_dirs=%%DATADIR%%
+
+# set defaults
+
+clamav_freshclam_enable=${clamav_freshclam_enable:-"NO"}
+clamav_freshclam_flags=${clamav_freshclam_flags:-"--checks=1 --datadir=%%DATADIR%% --daemon-notify=%%PREFIX%%/etc/clamav.conf --log=/var/log/clamav/freshclam.log"}
+
+load_rc_config $name
+
+# add --daemon to any given arguments
+clamav_freshclam_flags="${clamav_freshclam_flags} --daemon"
+run_rc_command "$1"