#!/bin/bash # # postfix Postfix Mail Transfer Agent # # chkconfig: 2345 80 30 # description: Postfix is a Mail Transport Agent, which is the program \ # that moves mail from one machine to another. # processname: master # pidfile: /var/spool/postfix/pid/master.pid # config: /etc/postfix/main.cf # config: /etc/postfix/master.cf start () { echo -n "Starting postfix: " newaliases postfix start 2> /dev/null && echo -e $RESULT_OK || echo -e $RESULT_FAIL } stop () { echo -n "Stopping postfix: " postfix stop 2> /dev/null && echo -e $RESULT_OK || echo -e $RESULT_FAIL } restart () { $0 stop $0 start } status () { echo -n "Checking for Postfix master process: " pidof master &> /dev/null && echo -e $RESULT_OK || echo -e $RESULT_FAIL } . /lib/lsb/init-functions