contrib/clamav/clamd

30 lines
403 B
Plaintext
Raw Normal View History

2006-10-24 22:36:15 +02:00
#!/bin/sh
#
# /etc/rc.d/clamd: start/stop clam antivirus daemon
#
2012-09-18 17:57:32 +02:00
CLAMDIR=/usr/share/clamav
2006-10-24 22:36:15 +02:00
case $1 in
start)
2012-09-18 17:57:32 +02:00
if [ ! -f ${CLAMDIR}/main.cvf -o ! -f ${CLAMDIR}/daily.cvd -o ! -f ${CLAMDIR}/bytecode.cvd ]
then
/usr/bin/freshclam
fi
2006-10-24 22:36:15 +02:00
/usr/sbin/clamd
;;
stop)
killall -q /usr/sbin/clamd
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "Usage: $0 [start|stop|restart]"
;;
esac
# End of file