blob: 0c031baebd93a29a252dd9509d903ead69a5866b (
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
38
39
40
41
42
43
|
#! /bin/sh
# PROVIDE: mailscanner
# REQUIRE: mta
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable mailscanner:
# mailscanner_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable mailscanner
# mailscanner_configfile (path): Set to "%%PREFIX%%/etc/MailScanner/MailScanner.conf" by default.
# mailscanner_pidfile (path): Set to "/var/run/MailScanner.pid" by default.
#
. /etc/rc.subr
name="mailscanner"
rcvar=`set_rcvar`
load_rc_config $name
: ${mailscanner_enable="NO"}
: ${mailscanner_configfile="%%PREFIX%%/etc/MailScanner/MailScanner.conf"}
: ${mailscanner_pidfile="/var/run/MailScanner.pid"}
command="%%PREFIX%%/sbin/mailscanner"
pidfile=${mailscanner_pidfile}
command_args="${mailscanner_configfile}"
required_files="${mailscanner_configfile}"
_ms_start_precmd() {
# Quietly try to raise the open_files limit
#
ulimit -n 2000 >/dev/null 2>&1
}
start_precmd=_ms_start_precmd
procname="MailScanner"
run_rc_command "$1"
|