aboutsummaryrefslogtreecommitdiff
path: root/japanese/mailman/files/mailman.in
blob: 6efc839a273e3aebb0adfc2e16c955e65eb1dc51 (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
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: mailman
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable mailman:
# mailman_enable (bool):        Set it to "YES" to enable mailman.
#                               Default is "NO".

. /etc/rc.subr

name="mailman"
rcvar=mailman_enable

pidfile="%%MAILMANDIR%%/data/master-qrunner.pid"

load_rc_config $name

: ${mailman_enable="NO"}

start_cmd=${name}_start
stop_cmd=${name}_stop
extra_commands="reload"

mailman_start() {
	%%MAILMANDIR%%/bin/mailmanctl -s -q start
}

mailman_stop() {
	[ -f $pidfile ] \
	  && %%MAILMANDIR%%/bin/mailmanctl -q stop \
	  || echo ${name} not running? \(check ${pidfile}\)
}

run_rc_command "$1"