]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/packages/clamav
439c20579f5ea7c0691ba814e1fa4e371802ec6e
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.cld" ] || \
16 [ -e "/var/lib/clamav/main.cvd" ] && \
17 [ -e "/var/lib/clamav/bytecode.cld" ] || \
18 [ -e "/var/lib/clamav/bytecode.cvd" ] && \
19 [ -e "/var/lib/clamav/daily.cld" ] || \
20 [ -e "/var/lib/clamav/daily.cvd" ] && \
22 if [ "$COUNTER" -lt "1" ]; then
23 boot_mesg
-n "Downloading database"
28 COUNTER
=$
(($COUNTER + 1))
30 if [ "$COUNTER" -gt "0" ]; then
33 if [ "$COUNTER" -gt "60" ]; then
34 boot_mesg
"Download takes longer than 15min check freshclam status!"
39 boot_mesg
"Starting Clamav Daemon..."
40 loadproc
/usr
/sbin
/clamd
42 boot_mesg
"Starting Clamav in background..."
43 /etc
/init.d
/clamav start
> /dev
/tty12
< /dev
/tty12
&
50 boot_mesg
"Stopping Clamav Definition Updater..."
51 killproc
/usr
/bin
/freshclam
52 rm -rf /var
/lib
/clamav
/*.tmp
54 boot_mesg
"Stopping Clamav Daemon..."
55 killproc
/usr
/sbin
/clamd
65 statusproc
/usr
/sbin
/clamd
66 statusproc
/usr
/bin
/freshclam
70 echo "Usage: $0 {start|stop|restart|status}"
75 # End $rc_base/init.d/clamav