#!/bin/sh
#
# Start Side Effects Software license manager
# This script goes in /etc/init.d and gets linked
# to S89sesi in /etc/rc2.d 
#
# $Revision: 1.1 $
#

IS_ON=/etc/chkconfig
SESI=/usr/lib/sesi/sesid
CONFIG=/etc/config
OPTIONS=

case "$1" in
  'start')
	if test -x $SESI; then
		if $IS_ON sesid; then
			OPTIONS="`cat $CONFIG/sesid.options`"
			exec $SESI $OPTIONS
		fi
	fi
        ;;

  'stop')
	echo Stopping Side Effects License Manager
	/usr/lib/sesi/sesiadmin -k
        ;;

  *)
        echo "usage: $0 {start|stop}"
        ;;
esac
