aboutsummaryrefslogtreecommitdiffstats
path: root/mail/postfix24/files/postfix.sh.in
blob: c44c1d84b0500552047ae5dc402270e70e16afdd (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
39
40
41
42
43
44
45
#!/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".
#

. %%RC_SUBR%%

name="postfix"
rcvar=`set_rcvar`

load_rc_config $name

: ${postfix_enable="NO"}
: ${postfix_pidfile="/var/spool/postfix/pid/master.pid"}
: ${postfix_procname="%%PREFIX%%/libexec/postfix/master"}

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

pidfile=${postfix_pidfile}
procname=${postfix_procname}

postfix_start() {
    %%PREFIX%%/sbin/postfix start
}

postfix_stop() {
    %%PREFIX%%/sbin/postfix stop
}

run_rc_command "$1"