summaryrefslogtreecommitdiff
path: root/extra/clamav
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-06-10 17:30:25 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-06-10 17:30:25 +0000
commitdd5222c4ae447eb7a6bda08ec5a3c2339852dc16 (patch)
treef868384a6a3676025bac736d7a688aefae8acddd /extra/clamav
parent622de23541903f9b6f85fe0a96d61de08372d23b (diff)
Fri Jun 10 17:30:25 UTC 2011
Diffstat (limited to 'extra/clamav')
-rw-r--r--extra/clamav/clamav72
-rw-r--r--extra/clamav/clamav.confd8
-rw-r--r--extra/clamav/clamav.install14
-rw-r--r--extra/clamav/clamav.logrotate8
4 files changed, 0 insertions, 102 deletions
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
-}