#!/bin/sh
# Begin $rc_base/init.d/postfix

# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org

#$LastChangedBy: dj $
#$Date: 2004-10-02 11:57:32 -0600 (Sat, 02 Oct 2004) $

. /etc/sysconfig/rc
. $rc_functions

case "$1" in
	start)
		echo "Starting Postfix..."
		loadproc /usr/sbin/postfix start
		;;

	stop)
		echo "Stopping Postfix..."
		loadproc /usr/sbin/postfix stop
		;;

	reload)
		echo "Reloading Postfix..."
		loadproc /usr/sbin/postfix reload
		;;

	abort)
		echo "Aborting Postfix..."
		loadproc /usr/sbin/postfix abort
		;;

	flush)
		echo "Flushing Postfix..."
		loadproc /usr/sbin/postfix flush
		;;

	check)
		echo "Checking Postfix..."
		loadproc /usr/sbin/postfix check
		;;

	restart)
		$0 stop
		sleep 1
		$0 start
		;;

	*)
		echo "Usage: $0 {start|stop|reload|abort|flush|check|restart}"
		exit 1
		;;
esac

# End $rc_base/init.d/postfix
