blob: 6d21c1a6ab465a5842d5a57e1a0674b6f943f0b8 (
plain)
1 #!/bin/sh
2 #
3 # /etc/rc.d/clamd: start/stop clam antivirus daemon
4 #
5
6 CLAMDIR=/usr/share/clamav
7
8 case $1 in
9 start)
10 if [ ! -f ${CLAMDIR}/main.cvf -o ! -f ${CLAMDIR}/daily.cvd -o ! -f ${CLAMDIR}/bytecode.cvd ]
11 then
12 /usr/bin/freshclam
13 fi
14 /usr/sbin/clamd
15 ;;
16 stop)
17 killall -q /usr/sbin/clamd
18 ;;
19 restart)
20 $0 stop
21 sleep 2
22 $0 start
23 ;;
24 *)
25 echo "Usage: $0 [start|stop|restart]"
26 ;;
27 esac
28
29 # End of file
|