:
#	@(#) mmdf 22.3 90/03/26 
#
#	Copyright (C) The Santa Cruz Operation, 1990.
#	This Module contains Proprietary Information of
#	The Santa Cruz Operation, and should be treated as Confidential.
#

# Begin SCO_BASE

case $1 in
'start')
	set `who -r`
	if [ "$9" = "S" ]		# run only during boot time
	then
		[ -x /usr/mmdf/bin/deliver ] &&
		/bin/su mmdf -c "/usr/mmdf/bin/deliver -b -clocal"
	fi
	;;
'stop')
	[ -x /bin/ps ] &&
	pid=`/bin/su root -c "/bin/ps -e" | grep deliver | sed -e 's/^  *//' -e 's/ .*//'`
	if [ "${pid}" != "" ]
	then
		[ -x /bin/kill ] &&
		/bin/kill ${pid}
	fi
	;;
*)
	echo "usage: /etc/init.d/mmdf {start|stop}"
	;;
esac

# End SCO_BASE
