From dd5222c4ae447eb7a6bda08ec5a3c2339852dc16 Mon Sep 17 00:00:00 2001 From: Parabola Date: Fri, 10 Jun 2011 17:30:25 +0000 Subject: Fri Jun 10 17:30:25 UTC 2011 --- extra/clamav/clamav | 72 ------------------------------------------- extra/clamav/clamav.confd | 8 ----- extra/clamav/clamav.install | 14 --------- extra/clamav/clamav.logrotate | 8 ----- 4 files changed, 102 deletions(-) delete mode 100644 extra/clamav/clamav delete mode 100644 extra/clamav/clamav.confd delete mode 100644 extra/clamav/clamav.install delete mode 100644 extra/clamav/clamav.logrotate (limited to 'extra/clamav') diff --git a/extra/clamav/clamav b/extra/clamav/clamav deleted file mode 100644 index 8e9c6afa9..000000000 --- a/extra/clamav/clamav +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -# source application-specific settings -[ -f /etc/conf.d/clamav ] && . /etc/conf.d/clamav - -PID_FC=`pidof -o %PPID /usr/bin/freshclam` -PID_CD=`pidof -o %PPID /usr/sbin/clamd` - -case "$1" in - start) - # if clamd isn't started first, notifyclamd fails at times - if [ "$START_CLAMD" == "yes" ]; then - stat_busy "Starting ClamD" - [ -z "$PID_CD" ] && /usr/sbin/clamd - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon clamav - stat_done - fi - fi - - # give clamd enough time to start - sleep 1 - - if [ "$START_FRESHCLAM" == "yes" ]; then - stat_busy "Starting FreshClam" - [ -z "$PID_FC" ] && /usr/bin/freshclam -p /var/run/clamav/freshclam.pid -d $FRESHCLAM_OPTS - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon clamav - stat_done - fi - fi - ;; - stop) - if [ "$START_CLAMD" == "yes" ]; then - stat_busy "Stopping ClamD" - [ -n "$PID_CD" ] && kill $PID_CD &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon clamav - stat_done - fi - fi - - if [ "$START_FRESHCLAM" == "yes" ]; then - stat_busy "Stopping FreshClam" - [ -n "$PID_FC" ] && kill $PID_FC &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon clamav - stat_done - fi - fi - ;; - restart) - $0 stop - # will not start if not fully stopped, so sleep - sleep 2 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/extra/clamav/clamav.confd b/extra/clamav/clamav.confd deleted file mode 100644 index 9cd44d9f8..000000000 --- a/extra/clamav/clamav.confd +++ /dev/null @@ -1,8 +0,0 @@ -# clamav startup script config options - -# change these to "yes" to start -START_FRESHCLAM="no" -START_CLAMD="no" - -# Options to pass to freshclam (man freshclam for more info). -FRESHCLAM_OPTS="-c 12" diff --git a/extra/clamav/clamav.install b/extra/clamav/clamav.install deleted file mode 100644 index 9116dc394..000000000 --- a/extra/clamav/clamav.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - getent group clamav &>/dev/null || groupadd -r -g 64 clamav >/dev/null - getent passwd clamav &>/dev/null || useradd -r -u 64 -g clamav -d /dev/null -s /bin/false -c "Clam AntiVirus" clamav >/dev/null - - install -d /var/{log,run}/clamav - chown clamav:root /var/{log,run}/clamav - chown -R clamav:clamav /var/lib/clamav -} - -post_remove() { - getent passwd clamav &>/dev/null && userdel clamav >/dev/null - getent group clamav &>/dev/null && groupdel clamav >/dev/null - return 0 -} diff --git a/extra/clamav/clamav.logrotate b/extra/clamav/clamav.logrotate deleted file mode 100644 index d1dc94dce..000000000 --- a/extra/clamav/clamav.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -/var/log/clamav/clamd.log /var/log/clamav/freshclam.log { - create 644 clamav clamav - sharedscripts - postrotate - /bin/kill -HUP `cat /var/run/clamav/clamd.pid 2>/dev/null` 2> /dev/null || true - /bin/kill -HUP `cat /var/run/clamav/freshclam.pid 2>/dev/null` 2> /dev/null || true - endscript -} -- cgit v1.2.3