mirror of
https://git.freebsd.org/ports.git
synced 2025-06-27 15:40:32 -04:00
literal name_enable wherever possible, and ${name}_enable when it's not, to prepare for the demise of set_rcvar(). In cases where I had to hand-edit unusual instances also modify formatting slightly to be more uniform (and in some cases, correct). This includes adding some $FreeBSD$ tags, and most importantly moving rcvar= to right after name= so it's clear that one is derived from the other.
38 lines
706 B
Bash
38 lines
706 B
Bash
#!/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"
|