Date: Thu, 01 Jun 2006 16:15:30 -0700 From: Doug Barton <dougb@FreeBSD.org> To: Paul Murphy <paul.murphy@cogeco.ca> Cc: gkovesdan@t-hosting.hu, freebsd-ports@freebsd.org Subject: Re: security/amavisd-new startup script Message-ID: <447F7512.4070605@FreeBSD.org> In-Reply-To: <447F68B4.7050503@cogeco.ca> References: <447F68B4.7050503@cogeco.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?447F7512.4070605>