#!/sbin/sh
#
# sendmail	This script handles the sendmail daemon.
#
# Version:	@(#) /sbin/init.d/sendmail 1.01 26-Oct-1993
#
# Author:	Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#

  # Source function library.
  . /sbin/init.d/functions

  # See how we were called.
  case "$1" in
    start)
	# Start the SMTP services.
	echo -n "Initializing SMTP port: "
	daemon /usr/sbin/sendmail -bd -q1m -om
	echo
	;;
    stop)
	# Stop SMTP services.
	echo -n "Shutting down SMTP port: "
	killproc -TERM 'sendmail: accepting connections'
	killproc -TERM  sendmail
	echo
	;;
    *)
	# Oops someone made a typo.
	echo "Usage: /sbin/init.d/sendmail {start|stop}"
	exit 1
  esac

exit 0
