security/amavisd-new startup script

Paul Murphy paul.murphy at cogeco.ca
Thu Jun 1 15:48:53 PDT 2006


  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.
-------------- next part --------------
#!/bin/sh
#
# $FreeBSD: ports/security/amavisd-new/files/amavisd.sh.in,v 1.3 2006/02/20 20:47:36 dougb Exp $
#

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

#
# Add the following lines to /etc/rc.conf to enable amavisd:
#
#amavisd_enable="YES"
#

. /etc/rc.subr

name=amavisd
rcvar=`set_rcvar`

load_rc_config $name

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

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

stop_postcmd=stop_postcmd

stop_postcmd()
{
  rm -f $pidfile
}

run_rc_command "$1"
-------------- next part --------------


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0622-3, 01/06/2006
Tested on: 01/06/2006 6:22:50 PM
avast! - copyright (c) 1988-2006 ALWIL Software.
http://www.avast.com





More information about the freebsd-ports mailing list