freebsd-ports/mail/p3scan/files/p3scan.in
Doug Barton 83eb2c3700 In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().

In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
2012-01-14 08:57:23 +00:00

37 lines
590 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# 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
#
. /etc/rc.subr
name=p3scan
rcvar=p3scan_enable
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"