From dace306f7c43e3d2a08916e06412bc2efb36c12d Mon Sep 17 00:00:00 2001 From: mnag Date: Mon, 16 Jan 2006 21:49:06 +0000 Subject: Modify rc.d script like example in Porters Handbook. --- mail/postfix27/files/postfix.sh.in | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'mail/postfix27') diff --git a/mail/postfix27/files/postfix.sh.in b/mail/postfix27/files/postfix.sh.in index 6ef4b39c77e1..c44c1d84b050 100644 --- a/mail/postfix27/files/postfix.sh.in +++ b/mail/postfix27/files/postfix.sh.in @@ -6,26 +6,31 @@ # REQUIRE: %%REQUIRE%% # KEYWORD: shutdown # -# Define these postfix_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/postfix +# 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". # -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# -postfix_enable="${postfix_enable-NO}" -postfix_pidfile="${postfix_pidfile:-/var/spool/postfix/pid/master.pid}" -postfix_procname="${postfix_procname:-%%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} @@ -37,5 +42,4 @@ postfix_stop() { %%PREFIX%%/sbin/postfix stop } -load_rc_config ${name} run_rc_command "$1" -- cgit