blob: 679a5f4710c13d8322773cda7418c7c15bfbe200 (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: mailman
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable or configure mailman:
#
# mailman_enable (bool): Set it to "YES" to enable mailman.
# Default is "NO".
#
# mailman_fix_perms (bool): Set it to "NO" to disable running
# check_perms on start or post-install.
# Default is "YES", but this is unsuitable
# for slow machines with many lists.
. /etc/rc.subr
name="mailman"
rcvar="mailman_enable"
required_dirs="%%MAILMANDIR%%/lists/mailman"
command_interpreter="%%PYTHON_CMD%%"
command="%%MAILMANDIR%%/bin/mailmanctl"
command_args="start"
pidfile="%%MAILMANDIR%%/data/master-qrunner.pid"
load_rc_config $name
: ${mailman_enable:="NO"}
: ${mailman_fix_perms:="YES"}
: ${mailman_flags:="-s -q"}
start_precmd=${name}_prestart
extra_commands="reload status"
mailman_prestart() {
if checkyesno mailman_fix_perms ; then
check_startmsgs && echo "Fixing ${name} permissions:"
env LC_ALL=C %%MAILMANDIR%%/bin/check_perms -f ${rc_debug:+-v}
fi
}
run_rc_command "$1"
|