#!/bin/sh
#
# This script will start the License Daemon, lmgrd.ste.  This
# script assumes that it will have the privileges required to
# move the license_log file.
#
licdir=/etc/opt/licenses
lmgrd=lmgrd.ste
licfile=licenses_combined
logfile=/usr/tmp/license_log

umask 022

if [ -f "${logfile}" ]; then
   date_str=`date +%y%m%d%H%M%S`
   echo "Moving old $logfile to $logfile.old.$date_str" 1>&2
   mv $logfile $logfile.old.$date_str
fi

echo "Starting License Manager Daemon lmgrd.ste" 1>&2
$licdir/${lmgrd} -c $licdir/$licfile > $logfile 2>&1 &
