security/amavisd-new startup script

Doug Barton dougb at FreeBSD.org
Thu Jun 1 16:15:37 PDT 2006


Paul Murphy wrote:
>  I need to keep the amavisd-new pid file in a location other than the
> default (/var/amavis/amavisd.pid), so I have rewritten the amavis rc
> script to include a knob for 'pidfile'. Please consider the attached
> file for the amavisd-new port.

> # Set defaults
> : ${amavisd_enable:="NO"}

Better to use = instead of := here, and - instead of :- below. See the
porter's handbook for an explanation.

> pidfile=${amavisd_pid:-"/var/amavis/amavisd.pid"}
command=/usr/local/sbin/amavisd
command_args="> /dev/null 2>&1"

> required_files=/usr/local/etc/amavisd.conf

This section should all be above the load_rc_config line in the script.
Also, you need to do it like this:

stop_postcmd=${name}_poststop
amavisd_poststop()
{
	rm -f $pidfile
}

Otherwise it looks good!

Doug

-- 

    This .signature sanitized for your protection



More information about the freebsd-ports mailing list