freebsd-ports/security/clamav/files/clamav-milter.sh
Alexander Leidinger 22f6c050aa Fix the comment in the startup-script regarding how to enable clamav-milter
in rc.conf.

Bumped PORTREVISION as this fix may be important for an user.

Mail is on its way to the maintainer but because of the actual virus
situation I do not wait for maintainer approval and commit the fix
right now (the submitter also submitted the startup-script for a previous
commit, so this is mainly a bugfix for a previously approved commit).

Submitted by:	Marius Strobl <marius@alchemy.franken.de>
2004-01-30 15:19:22 +00:00

48 lines
972 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: clamav-milter
# REQUIRE: LOGIN
# BEFORE: mail
# KEYWORD: FreeBSD shutdown
#
# Add the following lines to /etc/rc.conf to enable clamav-milter:
#
#clamav_milter_enable="YES"
#
# See clamav-milter(1) for flags
#
. %%RC_SUBR%%
name=clamav_milter
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/clamav-milter
required_dirs=%%DATADIR%%
required_files=%%PREFIX%%/etc/clamav.conf
start_precmd=start_precmd
start_precmd()
{
if [ -S "$clamav_milter_socket" ]; then
warn "Stale socket $clamav_milter_socket removed."
rm "$clamav_milter_socket"
fi
}
# set defaults
clamav_milter_enable=${clamav_milter_enable:-"NO"}
clamav_milter_socket=${clamav_milter_socket:-"%%CLAMAV_MILTER_SOCKET%%"}
clamav_milter_flags=${clamav_milter_flags:-"--postmaster-only --local --outgoing --max-children=50"}
load_rc_config $name
# add socket to any given argument
clamav_milter_flags="${clamav_milter_flags} ${clamav_milter_socket}"
run_rc_command "$1"