]>
git.ipfire.org Git - people/mfischer/ipfire-2.x.git/blob - src/initscripts/packages/clamav
2 # Begin $rc_base/init.d/clamav
9 if [ $
(basename $0) == "clamav" ]; then
10 boot_mesg
"Starting Clamav Definition Updater..."
11 loadproc
/usr
/bin
/freshclam
-d -c 10
14 while [ "$COUNTER" -lt "61" ]; do
15 [ -e "/var/lib/clamav/main.cvd" ] && \
16 [ -e "/var/lib/clamav/daily.cvd" ] || \
17 [ -e "/var/lib/clamav/daily.cld" ] && \
19 if [ "$COUNTER" -lt "1" ]; then
20 boot_mesg
-n "Downloading database"
25 COUNTER
=$
(($COUNTER + 1))
27 if [ "$COUNTER" -gt "0" ]; then
30 if [ "$COUNTER" -gt "60" ]; then
31 boot_mesg
"Download takes longer than 15min check freshclam status!"
36 boot_mesg
"Starting Clamav Daemon..."
37 loadproc
/usr
/sbin
/clamd
39 boot_mesg
"Starting Clamav in background..."
40 /etc
/init.d
/clamav start
> /dev
/tty12
< /dev
/tty12
&
47 boot_mesg
"Stopping Clamav Definition Updater..."
48 killproc
/usr
/bin
/freshclam
49 rm -rf /var
/lib
/clamav
/*.tmp
51 boot_mesg
"Stopping Clamav Daemon..."
52 killproc
/usr
/sbin
/clamd
62 statusproc
/usr
/sbin
/clamd
63 statusproc
/usr
/bin
/freshclam
67 echo "Usage: $0 {start|stop|restart|status}"
72 # End $rc_base/init.d/clamav