mirror of
https://git.freebsd.org/ports.git
synced 2025-06-19 03:30:32 -04:00
This variable is passed to postfix-script on startup, allowing administrators to do things like postfix_flags="-c /my/place/postfix" (alternate location of main.cf and master.cf), or postfix_flags="-v" (for verbose logging). See postfix(1) manpage for flags. PR: ports/109137 Reviewed by: Vivek Khera <vivek@khera.org> Approved by: philip
48 lines
1.1 KiB
Bash
48 lines
1.1 KiB
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: postfix
|
|
# REQUIRE: %%REQUIRE%%
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable postfix:
|
|
# postfix_enable (bool): Set it to "YES" to enable postfix.
|
|
# Default is "NO".
|
|
# postfix_pidfile (path): Set full path to master.pid.
|
|
# Default is "/var/spool/postfix/pid/master.pid".
|
|
# postfix_procname (command): Set command that start master. Used to verify if
|
|
# postfix is running.
|
|
# Default is "%%PREFIX%%/libexec/postfix/master".
|
|
# postfix_flags (str): Flags passed to postfix-script on startup.
|
|
# Default is "".
|
|
#
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
name="postfix"
|
|
rcvar=${name}_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${postfix_enable="NO"}
|
|
: ${postfix_pidfile="/var/spool/postfix/pid/master.pid"}
|
|
: ${postfix_procname="%%PREFIX%%/libexec/postfix/master"}
|
|
: ${postfix_flags=""}
|
|
|
|
start_cmd=${name}_start
|
|
stop_cmd=${name}_stop
|
|
extra_commands="reload"
|
|
|
|
pidfile=${postfix_pidfile}
|
|
procname=${postfix_procname}
|
|
|
|
postfix_start() {
|
|
%%PREFIX%%/sbin/postfix ${postfix_flags} start
|
|
}
|
|
|
|
postfix_stop() {
|
|
%%PREFIX%%/sbin/postfix ${postfix_flags} stop
|
|
}
|
|
|
|
run_rc_command "$1"
|