#! /bin/sh
# mail -- start or stop the sendmail daemon

. /etc/rc.d/sysconfig

case "$1" in
start)
    need filesystems network

    if [ -x /usr/lib/sendmail ];then
	echo "starting sendmail"
	/usr/lib/sendmail -q${MAIL_QUEUE:-5m}
	/usr/lib/sendmail -bd
    fi
    ;;
info)
    echo "Mail spooler"
    ;;
stop)
    if killall -0 sendmail; then
	echo "stopping sendmail"
	killall sendmail
    fi
    ;;
*)
    echo "usage: $0 {start|stop}"
    ;;
esac
