From d147213174104112eb283eac213c730eff592149 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 14 Feb 2007 10:26:14 +0000 Subject: Initial revision --- clamav/build/clamd.conf.patch | 67 +++++++++++++++++++++++++++++++++++++++++++ clamav/build/rc.clamav | 56 ++++++++++++++++++++++++++++++++++++ clamav/build/slack-desc | 19 ++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 clamav/build/clamd.conf.patch create mode 100755 clamav/build/rc.clamav create mode 100644 clamav/build/slack-desc (limited to 'clamav/build') diff --git a/clamav/build/clamd.conf.patch b/clamav/build/clamd.conf.patch new file mode 100644 index 00000000..4b6a1c8c --- /dev/null +++ b/clamav/build/clamd.conf.patch @@ -0,0 +1,67 @@ +--- clamd.conf.orig 2007-02-12 19:18:42.000000000 +0100 ++++ clamd.conf 2007-02-14 09:37:55.000000000 +0100 +@@ -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 ++LocalSocket /var/run/clamav/clamd + + # Remove stale socket after unclean shutdown. + # Default: no +-#FixStaleSocket yes ++FixStaleSocket yes + + # TCP port address. + # Default: no +@@ -142,14 +142,14 @@ + # Run as another user (clamd must be started by root to make this option + # working). + # 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/clamav/build/rc.clamav b/clamav/build/rc.clamav new file mode 100755 index 00000000..b3f8aed2 --- /dev/null +++ b/clamav/build/rc.clamav @@ -0,0 +1,56 @@ +#!/bin/sh +# Start/stop/restart clamav. +# $Id$ +# Author: Eric Hameleers +# --------------------------------------------------------------------------- + +# 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 diff --git a/clamav/build/slack-desc b/clamav/build/slack-desc new file mode 100644 index 00000000..c23acc2a --- /dev/null +++ b/clamav/build/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +clamav: clamav (a GPL-ed virus scanner) +clamav: +clamav: Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main purpose +clamav: of this software is the integration with mail servers (attachment +clamav: scanning). The package provides a flexible and scalable multi-threaded +clamav: daemon, a command line scanner, and a tool for automatic updating via +clamav: Internet. +clamav: Most importantly, the virus database is kept up to date . +clamav: For setup, see README.slackware in the /usr/doc/clamav-* directory. +clamav: +clamav: clamav info at http://www.clamav.net/ -- cgit v1.2.3-80-g2a13