#! /bin/sh
#
#   @(#)init.ism	1.3	11/10/00
#
#   Copyright (c) 1999, by Sun Microsystems, Inc.
#   All rights reserved.
#

BASEDIR="@BASEDIR@"
ISMD="${BASEDIR}/bin/ismd"
ISMCF="${BASEDIR}/etc/ism.cf"

case "$1" in
'start')
	if [ ! -f "${ISMCF}" ]; then
		echo "${0}: ${ISMCF} is missing; cannot start..." >/dev/msglog 
	elif [ ! -x "${ISMD}" ]; then
		echo "${0}: cannot run ${ISMD}..." >/dev/msglog 
	else
		echo 'ismd starting...'
		"${ISMD}" -f "${ISMCF}" > /dev/msglog 2>&1
	fi
	;;

'stop')
	/usr/bin/pkill -x ismd
	;;

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

esac
exit 0
