diff options
author | Marcus Alves Grando <mnag@FreeBSD.org> | 2006-01-16 21:49:06 +0000 |
---|---|---|
committer | Marcus Alves Grando <mnag@FreeBSD.org> | 2006-01-16 21:49:06 +0000 |
commit | 6adb5c62954f3eae7664522b1bc64ca17cf2e69d (patch) | |
tree | 46a6076ed3e63dc6ff3f04a480b1581105174d1a /mail/postfix28 | |
parent | Update to 2.3-20060112 (diff) |
Modify rc.d script like example in Porters Handbook.
Notes
Notes:
svn path=/head/; revision=153685
Diffstat (limited to 'mail/postfix28')
-rw-r--r-- | mail/postfix28/files/postfix.sh.in | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/mail/postfix28/files/postfix.sh.in b/mail/postfix28/files/postfix.sh.in index 6ef4b39c77e1..c44c1d84b050 100644 --- a/mail/postfix28/files/postfix.sh.in +++ b/mail/postfix28/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" |