summaryrefslogtreecommitdiff
path: root/mail/p3scan/files/p3scan.in
blob: dde820b6449c45e6391f46da73878d7613d301be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/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=`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"