clamd 321 B

1234567891011121314151617181920212223
  1. CLAMDIR=/usr/share/clamav
  2. case $1 in
  3. start)
  4. if [ ! -f ${CLAMDIR}/main.cvf -o ! -f ${CLAMDIR}/daily.cvd -o ! -f ${CLAMDIR}/bytecode.cvd ]
  5. then
  6. /usr/bin/freshclam
  7. fi
  8. /usr/sbin/clamd
  9. ;;
  10. stop)
  11. killall -q /usr/sbin/clamd
  12. ;;
  13. restart)
  14. $0 stop
  15. sleep 2
  16. $0 start
  17. ;;
  18. *)
  19. echo "Usage: $0 [start|stop|restart]"
  20. ;;
  21. esac