#!/bin/sh
#
# @(#)S85lmgrd	1.6 11/3/93 Copyright (c) 1993 by Sun Microsystems, Inc.
#
# /etc/rc2.d/S85lmgrd - Start up the license manager daemon

lmgrd=lmgrd.ste
licdir=/etc/opt/licenses
licfile=licenses_combined
if [ -f /vmunix ]
then
	opt="-ax"
	LICPS="ps"
else
	opt="-ef"
	LICPS="/usr/bin/ps"
fi
if [ -f $licdir/$lmgrd -a -f $licdir/$licfile ]; then
	${LICPS} ${opt} | grep ${lmgrd} | grep -v grep > /dev/null 2>&1
	if [ $? -eq 0 ]
	then
		echo "License Manager daemon already running"
	else
		echo "Starting License Manager Daemon"
		$licdir/${lmgrd} -c $licdir/$licfile >> /tmp/license_log 2>&1 &
	fi
fi
