#!/bin/sh
#
# $FreeBSD: ports/mail/p3scan/files/p3scan.in,v 1.2 2007/06/17 07:28:33 edwin Exp $
#
# PROVIDE: p3scan
# REQUIRE: DAEMON
#
# Add the following lines to /etc/rc.conf to enable p3scan:
# p3scan_enable="YES"
#
# Optional:
# p3scan_config="%%PREFIX%%/etc/p3scan/p3scan.conf
#

. %%RC_SUBR%%

name=p3scan
rcvar=`set_rcvar`

required_files=%%PREFIX%%/etc/p3scan/p3scan.conf

# set defaults

p3scan_enable=${p3scan_enable:-"NO"}
p3scan_config=${p3scan_config:-"%%PREFIX%%/etc/p3scan/p3scan.conf"}

load_rc_config $name
run_rc_command "$1"

start_cmd="p3scan_start"

p3scan_start()
{
    %%PREFIX%%/sbin/p3scan -f ${p3scan_config}
}

run_rc_command "$1"


syntax highlighted by Code2HTML, v. 0.9.1