|
|
# Distributed under the terms of the GNU General Public License v2 | # 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 $ | # $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" | opts="${opts} reload" |
| |
depend() { | depend() { |
use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd | use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd |
provide mta |
if [ "${SVCNAME}" == "postfix" ]; then |
|
provide mta |
|
fi |
} | } |
| |
start() { | start() { |
ebegin "Starting postfix" |
ebegin "Starting postfix (${CONF_DIR})" |
/usr/sbin/postfix start &>/dev/null |
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 $? | eend $? |
} | } |
| |
stop() { | stop() { |
ebegin "Stopping postfix" |
ebegin "Stopping postfix (${CONF_DIR})" |
/usr/sbin/postfix stop &>/dev/null |
/usr/sbin/postfix -c ${CONF_DIR} stop &>/dev/null |
eend $? | eend $? |
} | } |
| |
reload() { | reload() { |
ebegin "Reloading postfix" |
ebegin "Reloading postfix (${CONF_DIR})" |
/usr/sbin/postfix reload &>/dev/null |
/usr/sbin/postfix -c ${CONF_DIR} reload &>/dev/null |
eend $? | eend $? |
} | } |