summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-mta/postfix/files/postfix.rc6.2.6')
-rw-r--r--mail-mta/postfix/files/postfix.rc6.2.653
1 files changed, 53 insertions, 0 deletions
diff --git a/mail-mta/postfix/files/postfix.rc6.2.6 b/mail-mta/postfix/files/postfix.rc6.2.6
new file mode 100644
index 000000000000..9e7fbc56d1cd
--- /dev/null
+++ b/mail-mta/postfix/files/postfix.rc6.2.6
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/postfix.rc6.2.6,v 1.1 2011/06/15 10:24:58 eras Exp $
+
+# Please read http://www.postfix.org/MULTI_INSTANCE_README.html for multi instance support
+
+CONF_DIR="/etc/postfix"
+CONF_OPT="${SVCNAME##*.}"
+if [ -n ${CONF_OPT} -a ${SVCNAME} != "postfix" ]; then
+ CONF_DIR="${CONF_DIR}.${CONF_OPT}"
+fi
+if [ "${CONF_DIR}" = "/etc/postfix" ]; then
+ CONF_PARAM=""
+ CONF_MESSAGE=""
+else
+ CONF_PARAM="-c ${CONF_DIR}"
+ CONF_MESSAGE="(${CONF_DIR})"
+fi
+
+opts="${opts} reload"
+
+depend() {
+ use logger dns ypbind amavisd antivirus postfix_greylist net saslauthd
+ if [ "${SVCNAME}" = "postfix" ]; then
+ provide mta
+ fi
+}
+
+start() {
+ if [ ! -z "${CONF_PARAM}" ]; then
+ einfo "Please consider updating your config for postmulti support."
+ fi
+ ebegin "Starting postfix ${CONF_MESSAGE}"
+ if [ ! -d ${CONF_DIR} ]; then
+ eend 1 "${CONF_DIR} does not exist"
+ return 1
+ fi
+ /usr/sbin/postfix ${CONF_PARAM} start >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping postfix ${CONF_MESSAGE}"
+ /usr/sbin/postfix ${CONF_PARAM} stop >/dev/null 2>&1
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading postfix ${CONF_MESSAGE}"
+ /usr/sbin/postfix ${CONF_PARAM} reload >/dev/null 2>&1
+ eend $?
+}