]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/initscripts/init.d/clamav
Load libata prior udev at installer because some SATA doesnt autoload it
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / clamav
CommitLineData
f7ff12a3
MT
1#!/bin/sh
2# Begin $rc_base/init.d/clamav
3
4. /etc/sysconfig/rc
5. $rc_functions
6
7case "$1" in
8 start)
9 boot_mesg "Starting Clamav Definition Updater..."
10 loadproc /usr/bin/freshclam -d -c 10
11
12 boot_mesg "Starting Clamav Daemon..."
0dde24fa
MT
13 COUNTER=0
14 while [ "$COUNTER" -lt "10" ]; do
15 [ -e "/usr/share/clamav/main.cvd" ] && \
16 [ -e "/usr/share/clamav/daily.cvd" ] && \
17 break
18 sleep 5
7f586050 19 COUNTER=$(($COUNTER + 1))
0dde24fa 20 done
f7ff12a3
MT
21 loadproc /usr/sbin/clamd
22 ;;
23
24 stop)
25 boot_mesg "Stopping Clamav Definition Updater..."
26 killproc /usr/bin/freshclam
27
28 boot_mesg "Stopping Clamav Daemon..."
29 killproc /usr/sbin/clamd
30 ;;
31
32 restart)
33 $0 stop
34 sleep 1
35 $0 start
36 ;;
37
38 status)
39 statusproc /usr/sbin/clamd
40 statusproc /usr/bin/freshclam
41 ;;
42
43 *)
44 echo "Usage: $0 {start|stop|restart|status}"
45 exit 1
46 ;;
47esac
48
49# End $rc_base/init.d/clamav