#!/sbin/sh
#
# Copyright (c) 1999 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident	"@(#)IIim	1.10	03/09/12 SMI"

case "$1" in
'start')
	is_priv_port=`/usr/sbin/ndd /dev/tcp tcp_extra_priv_ports | /usr/bin/grep -w 9010`
	if [ ! -n "$is_priv_port" ]; then
	   /usr/sbin/ndd -set /dev/tcp tcp_extra_priv_ports_add 9010
	fi
	if [ -x /usr/lib/im/htt ]; then
		/usr/lib/im/htt -port 9010 -syslog -message_locale C >/dev/null 2>&1 &
	fi
	;;

'stop')
	/usr/bin/pkill -TERM -x -u 0 htt
	;;

*)
	echo "Usage: $0 { start | stop }"
	exit 1
	;;
esac
exit 0
