:
#	@(#) mmdf 23.3 91/09/28 
#
#	Copyright (C) 1990-1991 The Santa Cruz Operation, Inc.
#		All Rights Reserved.
#	The information in this file is provided for the exclusive use of
#	the licensees of The Santa Cruz Operation, Inc.  Such users have the
#	right to use, modify, and incorporate this code into other products
#	for purposes authorized by the license agreement provided they include
#	this notice and the associated copyright notice with any such product.
#	The information in this file is provided "AS IS" without warranty.
#
# Begin SCO_BASE

case $1 in
'start')
	set `who -r`
	if [ "$9" = "S" ]		# run only during boot time
	then
		[ -x /usr/mmdf/bin/cleanlck ] &&
		/bin/sh /usr/mmdf/bin/cleanlck > /dev/null 2>&1
		[ -x /usr/mmdf/bin/deliver ] &&
		/bin/su mmdf -c "/usr/mmdf/bin/deliver -b"
	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
