--- postfix.dist 2007-02-11 15:25:01.000000000 -0800 +++ postfix 2007-02-11 23:17:33.000000000 -0800 @@ -3,27 +3,39 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/postfix.rc6.2.2.9,v 1.1 2006/03/07 21:07:20 ferdy Exp $ +CONF_DIR="/etc/postfix" +CONF_OPT="${SVCNAME##*.}" +if [[ -n ${CONF_OPT} && ${SVCNAME} != "postfix" ]]; then + CONF_DIR="${CONF_DIR}.${CONF_OPT}" +fi + opts="${opts} reload" depend() { use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd - provide mta + if [ "${SVCNAME}" == "postfix" ]; then + provide mta + fi } start() { - ebegin "Starting postfix" - /usr/sbin/postfix start &>/dev/null + ebegin "Starting postfix (${CONF_DIR})" + if [ ! -d ${CONF_DIR} ]; then + eend 1 "${CONF_DIR} does not exist" + return 1 + fi + /usr/sbin/postfix -c ${CONF_DIR} start &>/dev/null eend $? } stop() { - ebegin "Stopping postfix" - /usr/sbin/postfix stop &>/dev/null + ebegin "Stopping postfix (${CONF_DIR})" + /usr/sbin/postfix -c ${CONF_DIR} stop &>/dev/null eend $? } reload() { - ebegin "Reloading postfix" - /usr/sbin/postfix reload &>/dev/null + ebegin "Reloading postfix (${CONF_DIR})" + /usr/sbin/postfix -c ${CONF_DIR} reload &>/dev/null eend $? }