diff options
author | Yalla-One <yallaone@gmail.com> | 2010-05-13 00:39:54 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-13 00:39:54 +0200 |
commit | 8b9fb0d47dbe3761753a21493b737829a96bd146 (patch) | |
tree | 231be308f496929a9d0265572199c4e80670da96 /system/clamav/config | |
parent | 08a7ad2bc91317a6627d5de166a66fe99a152d66 (diff) | |
download | slackbuilds-8b9fb0d47dbe3761753a21493b737829a96bd146.tar.gz |
system/clamav: Updated for version 0.95.2
Diffstat (limited to 'system/clamav/config')
-rw-r--r-- | system/clamav/config/clamd.conf.patch | 68 | ||||
-rw-r--r-- | system/clamav/config/freshclam.conf.patch | 61 | ||||
-rw-r--r-- | system/clamav/config/rc.clamav | 59 |
3 files changed, 188 insertions, 0 deletions
diff --git a/system/clamav/config/clamd.conf.patch b/system/clamav/config/clamd.conf.patch new file mode 100644 index 0000000000..a18ff49d88 --- /dev/null +++ b/system/clamav/config/clamd.conf.patch @@ -0,0 +1,68 @@ +diff -Nur clamav-0.95.2.orig/etc/clamd.conf clamav-0.95.2/etc/clamd.conf +--- clamav-0.95.2.orig/etc/clamd.conf 2009-04-07 05:32:06.000000000 -0500 ++++ clamav-0.95.2/etc/clamd.conf 2009-08-10 10:56:05.791514384 -0500 +@@ -5,7 +5,7 @@ + + + # Comment or remove the line below. +-Example ++#Example + + # Uncomment this option to enable logging. + # LogFile must be writable for the user running daemon. +@@ -40,12 +40,12 @@ + + # Use system logger (can work together with LogFile). + # Default: no +-#LogSyslog yes ++LogSyslog yes + + # Specify the type of syslog messages - please refer to 'man syslog' + # for facility names. + # Default: LOG_LOCAL6 +-#LogFacility LOG_MAIL ++LogFacility LOG_MAIL + + # Enable verbose logging. + # Default: no +@@ -54,7 +54,7 @@ + # This option allows you to save a process identifier of the listening + # daemon (main thread). + # Default: disabled +-#PidFile /var/run/clamd.pid ++PidFile /var/run/clamav/clamd.pid + + # Optional path to the global temporary directory. + # Default: system specific (usually /tmp or /var/tmp). +@@ -69,11 +69,11 @@ + + # Path to a local socket file the daemon will listen on. + # Default: disabled (must be specified by a user) +-LocalSocket /tmp/clamd.socket ++LocalSocket /var/run/clamav/clamd.socket + + # Remove stale socket after unclean shutdown. + # Default: yes +-#FixStaleSocket yes ++FixStaleSocket yes + + # TCP port address. + # Default: no +@@ -167,14 +167,14 @@ + + # Run as another user (clamd must be started by root for this option to work) + # Default: don't drop privileges +-#User clamav ++User clamav + + # Initialize supplementary group access (clamd must be started by root). + # Default: no +-#AllowSupplementaryGroups no ++AllowSupplementaryGroups yes + + # Stop daemon when libclamav reports out of memory condition. +-#ExitOnOOM yes ++ExitOnOOM yes + + # Don't fork into background. + # Default: no diff --git a/system/clamav/config/freshclam.conf.patch b/system/clamav/config/freshclam.conf.patch new file mode 100644 index 0000000000..a55c90cd9a --- /dev/null +++ b/system/clamav/config/freshclam.conf.patch @@ -0,0 +1,61 @@ +diff -Nur clamav-0.95.2.orig/etc/freshclam.conf clamav-0.95.2/etc/freshclam.conf +--- clamav-0.95.2.orig/etc/freshclam.conf 2009-03-16 13:43:35.000000000 -0500 ++++ clamav-0.95.2/etc/freshclam.conf 2009-08-10 10:53:12.146515711 -0500 +@@ -5,7 +5,7 @@ + + + # Comment or remove the line below. +-Example ++#Example + + # Path to the database directory. + # WARNING: It must match clamd.conf's directive! +@@ -34,25 +34,25 @@ + + # Use system logger (can work together with UpdateLogFile). + # Default: no +-#LogSyslog yes ++LogSyslog yes + + # Specify the type of syslog messages - please refer to 'man syslog' + # for facility names. + # Default: LOG_LOCAL6 +-#LogFacility LOG_MAIL ++LogFacility LOG_MAIL + + # This option allows you to save the process identifier of the daemon + # Default: disabled +-#PidFile /var/run/freshclam.pid ++PidFile /var/run/clamav/freshclam.pid + + # By default when started freshclam drops privileges and switches to the + # "clamav" user. This directive allows you to change the database owner. + # Default: clamav (may depend on installation options) +-#DatabaseOwner clamav ++DatabaseOwner clamav + + # Initialize supplementary group access (freshclam must be started by root). + # Default: no +-#AllowSupplementaryGroups yes ++AllowSupplementaryGroups yes + + # Use DNS to verify virus database version. Freshclam uses DNS TXT records + # to verify database and software versions. With this directive you can change +@@ -64,7 +64,7 @@ + + # Uncomment the following line and replace XY with your country + # code. See http://www.iana.org/cctld/cctld-whois.htm for the full list. +-#DatabaseMirror db.XY.clamav.net ++#DatabaseMirror db.@COUNTRY@.clamav.net + + # database.clamav.net is a round-robin record which points to our most + # reliable mirrors. It's used as a fall back in case db.XY.clamav.net is +@@ -111,7 +111,7 @@ + + # Send the RELOAD command to clamd. + # Default: no +-#NotifyClamd /path/to/clamd.conf ++NotifyClamd /etc/clamd.conf + + # Run command after successful database update. + # Default: disabled diff --git a/system/clamav/config/rc.clamav b/system/clamav/config/rc.clamav new file mode 100644 index 0000000000..43940738a4 --- /dev/null +++ b/system/clamav/config/rc.clamav @@ -0,0 +1,59 @@ +#!/bin/sh +# Start/stop/restart clamav. +# $Id: rc.clamav,v 1.1 2007/02/14 10:29:03 root Exp root $ +# Author: Eric Hameleers <alien@slackware.com> +# --------------------------------------------------------------------------- +# Slightly modified by Robby Workman <rworkman@slackbuilds.org> +# to replace backticks ( s/`command`/$(command)/ ) + +# Set to '1' if you want milter support: +MILTER=0 + +# Start clamav: +clamav_start() { + if [ -x /usr/sbin/clamd ]; then + echo -n "Starting clamd daemon: /usr/sbin/clamd " + /usr/sbin/clamd + echo "." + # Give clamd a chance to create the socket + sleep 1 + echo -n "Starting freshclam daemon: /usr/bin/freshclam -d -l /var/log/freshclam.log " + /usr/bin/freshclam -d -l /var/log/freshclam.log + echo "." + if [ "$MILTER" == "1" ]; then + echo -n "Starting clamav-milter daemon: /usr/sbin/clamav-milter -dblo --max-children=2 local:/var/run/clamav/clmilter.sock " + /usr/sbin/clamav-milter -dblo --max-children=2 local:/var/run/clamav/clmilter.sock + echo "." + fi + fi +} + +# Stop clamav: +clamav_stop() { + kill $(cat /var/run/clamav/clamd.pid) + #killall freshclam + kill $(cat /var/run/clamav/freshclam.pid) + [ "$MILTER" == "1" ] && killall clamav-milter +} + +# Restart clamav: +clamav_restart() { + clamav_stop + sleep 1 + clamav_start +} + +case "$1" in +'start') + clamav_start + ;; +'stop') + clamav_stop + ;; +'restart') + clamav_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac + |