#!/bin/sh -e # Called when an interface disconnects # Written by LaMont Jones # start or reload Postfix as needed # If /usr isn't mounted yet, silently bail. # Eisfair-2 version if [ ! -d /usr/local/postfix ] then exit 0 fi RUNNING="" if [ -n "`ps -ef | grep -v grep | grep '/usr/local/postfix/master' 2>/dev/null`" ] then RUNNING="y" fi f=/etc/resolv.conf if ! cp $f $(postconf -h queue_directory)$f 2>/dev/null then exit 0 fi if [ -n "$RUNNING" ] then /etc/init.d/postfix reload >/dev/null 2>&1 fi exit 0