blob: 06577331eeaaf330919f77cadc9ea3fe42a12a31 (
plain)
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
|
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: dovecot.sh,v 1.1.1.1 2010/11/05 12:00:39 adam Exp $
#
# PROVIDE: dovecot
# REQUIRE: DAEMON LOGIN ntpdate
. /etc/rc.subr
name="dovecot"
rcvar=$name
command="@PREFIX@/sbin/${name}"
required_files="@PKG_SYSCONFDIR@/dovecot/$name.conf"
extra_commands="reload"
load_rc_config $name
dovecot_fdlimit=${dovecot_fdlimit-"768"}
# A default limit of 64 (at least on NetBSD) may be too low for many people
SOFT_FDLIMIT=`ulimit -S -n`
HARD_FDLIMIT=`ulimit -H -n`
if [ ${dovecot_fdlimit} -gt ${SOFT_FDLIMIT} ]; then
if [ ${dovecot_fdlimit} -le ${HARD_FDLIMIT} ]; then
ulimit -S -n ${dovecot_fdlimit}
else
ulimit -S -n ${HARD_FDLIMIT}
fi
fi
run_rc_command "$1"
|