commit 9f9f0d843d6f1c991d2fc6f396e7e0e72c0499f0 Author: kueller Date: Mon Jan 3 10:48:06 2011 +0000 Neue Version V963 git-svn-id: svn://svn.compuextreme.de/Viitor/V963/Viitor_clamav@5933 504e572c-2e33-0410-9681-be2bf7408885 diff --git a/etc/init.d/clamav b/etc/init.d/clamav new file mode 100644 index 0000000..ddb917b --- /dev/null +++ b/etc/init.d/clamav @@ -0,0 +1,34 @@ +#!/bin/sh + +source /etc/init.d/functions + +case "$1" in + start) + echo "Starting clamd" + loadproc /usr/sbin/clamd + + if [ -f /usr/sbin/clamav-milter ]; then + echo "Starting milter" + loadproc /usr/sbin/clamav-milter + fi + ;; + stop) + if [ -f /usr/sbin/clamav-milter ]; then + echo "Stopping milter" + killproc /usr/sbin/clamav-milter + fi + + echo "Stopping clamd" + killproc /usr/sbin/clamd + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit 0 diff --git a/etc/init/clamav-milter.conf b/etc/init/clamav-milter.conf new file mode 100644 index 0000000..6448dd5 --- /dev/null +++ b/etc/init/clamav-milter.conf @@ -0,0 +1,11 @@ +description "clamav mail virus scanner for sendmail startup" +author "Harald Kueller " +version 1.0 +emits none special + +start on (runlevel [2345] and (started clamd)) +stop on stopping clamd + +console output + +exec /usr/sbin/clamav-milter diff --git a/etc/init/clamd.conf b/etc/init/clamd.conf new file mode 100644 index 0000000..cd68488 --- /dev/null +++ b/etc/init/clamd.conf @@ -0,0 +1,11 @@ +description "clamav virus scanner deamon startup" +author "Harald Kueller " +version 1.0 +emits none special + +start on (runlevel [2345] and (started ifup)) +stop on runlevel [016] + +console output + +exec /usr/sbin/clamd diff --git a/init/genpkg b/init/genpkg new file mode 100644 index 0000000..2226158 --- /dev/null +++ b/init/genpkg @@ -0,0 +1,20 @@ +#!/bin/bash +# + +if [ -d /var/install/sysvinit* ]; then + WDIR=`pwd` + cd etc/init.d + chmod 755 clamav + mkdir rc{0,1,2,3,4,5,6}.d + for i in 0 1 2 6; do + cd rc$i.d + ln -s ../clamav K41clamav + cd .. + done + for i in 3 4 5; do + cd rc$i.d + ln -s ../clamav S59clamav + cd .. + done + cd $WDIR +fi diff --git a/tmp/postinstall b/tmp/postinstall new file mode 100644 index 0000000..43ed76c --- /dev/null +++ b/tmp/postinstall @@ -0,0 +1,10 @@ +#!/bin/bash + +if ! getent group clamav >/dev/null; then + groupadd -g 30 clamav +fi +if ! getent passwd clamav >/dev/null; then + useradd -u 55 -g clamav -d /tmp clamav +fi + +chown clamav:clamav /usr/share/clamav/main.cvd diff --git a/tmp/postremove b/tmp/postremove new file mode 100644 index 0000000..d64bbba --- /dev/null +++ b/tmp/postremove @@ -0,0 +1,8 @@ +#!/bin/bash + +if getent passwd clamav >/dev/null; then + userdel clamav +fi +if getent group clamav >/dev/null; then + groupdel clamav +fi diff --git a/usr/share/doc/clamav/clamdoc.pdf b/usr/share/doc/clamav/clamdoc.pdf new file mode 100644 index 0000000..017b144 Binary files /dev/null and b/usr/share/doc/clamav/clamdoc.pdf differ diff --git a/usr/share/doc/clamav/dummyvirus/eicar.com b/usr/share/doc/clamav/dummyvirus/eicar.com new file mode 100644 index 0000000..704cac8 --- /dev/null +++ b/usr/share/doc/clamav/dummyvirus/eicar.com @@ -0,0 +1 @@ +X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*