#!/bin/sh
#
# $FreeBSD: tags/RELEASE_12_0_0/security/clamav/files/clamav-clamd.in 457649 2017-12-30 22:25:18Z ler $
#

# PROVIDE: clamav_clamd
# REQUIRE: LOGIN
# BEFORE: mail
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable clamd:
#
# clamav_clamd_enable="YES"
# clamav_clamd_flags="<set as needed>"
#
# See clamd(8) for flags
#

. /etc/rc.subr

name=clamd
rcvar=clamav_clamd_enable

# read settings, set default values
load_rc_config "$name"

: ${clamav_clamd_enable:=YES}
: ${clamav_clamd_pidfile="/var/run/clamd.pid"}

command=/usr/sbin/clamd
required_files=/etc/clamd.conf

extra_commands=reload
reload_cmd="/usr/bin/clamdscan --reload"

run_rc_command "$1"
