home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 June (Extra) / CHIP 2006-06.3.iso / program / opensource / clamav-devel.exe / contrib / init / FreeBSD5.2 / clamav
Encoding:
Text File  |  2006-05-16  |  1.5 KB  |  49 lines

  1. #!/bin/sh
  2.  
  3. # Copyright (C) 2004 Nigel Horne <njh@bandsman.co.uk>
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  18. # MA 02110-1301, USA.
  19. #
  20. # Install into /usr/local/etc/rc.d as /usr/local/etc/rc.d/clamav.sh
  21. #    chmod 755 /usr/local/etc/rc.d/clamav.sh
  22. #
  23. # Add lines such as this to /etc/rc.conf:
  24. #    clamd_enable="YES"
  25. #    clamav_milter_enable="YES"
  26. #    clamav_milter_flags="--max-children=2 --dont-wait --timeout=0 -P local:/var/run/clamav/clamav.sock --pidfile=/var/run/clamav/clamav-milter.pid --quarantine-dir=/var/run/clamav/quarantine"
  27. #
  28. # Tested with FreeBSD 5.2 and 5.3
  29.  
  30. # PROVIDE: clamav
  31. # REQUIRE: NETWORKING
  32. # KEYWORD: FreeBSD
  33.  
  34. . /etc/rc.subr
  35.  
  36. name="clamd"
  37. rcvar="`set_rcvar`"
  38. command="/usr/local/sbin/${name}"
  39.  
  40. load_rc_config $name
  41. run_rc_command "$1"
  42.  
  43. name="clamav_milter"
  44. rcvar="`set_rcvar`"
  45. command="/usr/local/sbin/clamav-milter"
  46.  
  47. load_rc_config $name
  48. run_rc_command "$1"
  49.