#!/bin/sh # # postfix-out # Postfix second instance for Redhat Linux 8.0 # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -x /usr/sbin/postfix ] || exit 0 [ -d /etc/postfix-out ] || exit 0 [ -d /var/spool/postfix-out ] || exit 0 RETVAL=0 start() { # Start daemons. echo -n "Starting postfix-out: " if [ ! -e /var/spool/postfix-out/etc/resolv.conf ]; then cp -f /etc/resolv.conf /var/spool/postfix-out/etc fi /usr/sbin/postfix -c /etc/postfix-out start 2>/dev/null 1>&2 && success || failure RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/postfix-out echo return $RETVAL } stop() { # Stop daemons. echo -n "Shutting down postfix-out: " /usr/sbin/postfix -c /etc/postfix-out stop 2>/dev/null 1>&2 && success || failure RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/postfix-out echo return $RETVAL } reload() { echo -n "Reloading postfix-out: " /usr/sbin/postfix -c /etc/postfix-out reload 2>/dev/null 1>&2 && success || failure RETVAL=$? echo return $RETVAL } abort() { /usr/sbin/postfix -c /etc/postfix-out abort 2>/dev/null 1>&2 && success || failure return $? } flush() { /usr/sbin/postfix -c /etc/postfix-out flush 2>/dev/null 1>&2 && success || failure return $? } check() { /usr/sbin/postfix -c /etc/postfix-out check 2>/dev/null 1>&2 && success || failure return $? } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) stop start ;; reload) reload ;; abort) abort ;; flush) flush ;; check) check ;; status) status master ;; condrestart) [ -f /var/lock/subsys/postfix-out ] && restart || : ;; *) echo "Usage: postfix-out {start|stop|restart|reload|abort|flush|check|status|condrestart}" exit 1 esac exit $?