#!/bin/bash

#*****************************************************************
#                                                                *
#   Copyright (c) 2006 by FRIENDSHIP SYSTEMS GmbH                *
#   Benzstr.2, D-14482 Potsdam                                   *
#   www.FRIENDSHIP-SYSTEMS.com                                   *
#                                                                *
#   This code and parts thereof are subject to                   *
#   license agreements. Unauthorized usage,                      *
#   modification, distribution, dissemination,                   *
#   and/or modification etc. is strictly prohibited.             *
#                                                                *
#   THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY            *
#   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT          *
#   LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY        *
#   AND FITNESS FOR A PARTICULAR PURPOSE.                        *
#                                                                *
#*****************************************************************
# 
# Local Float License Server startup script
# arch:  Linux.x86_64

# setup your command line arguments here, or pass them to this script as argument too
# further options are available passing "-h" as argument
#ARGS="-e -p 8080 -i 10.10.10.2"
ARGS="-e"

abspath=$(cd ${0%/*} && echo $PWD/${0##*/})

# to get the path only - not the script name
HERE=`dirname "$abspath"`


export FWORK=${HERE}
if [ -z $FSBASE ] ; then
  export FSBASE=${HERE}
fi

export FS_LIB_DIR=${HERE}/lib/Linux.x86_64/
export FS_BIN_DIR=${HERE}/bin/Linux.x86_64/

if [ -z $LD_LIBRARY_PATH ] ; then
  export LD_LIBRARY_PATH=$FS_LIB_DIR
else
  export LD_LIBRARY_PATH=$FS_LIB_DIR:$LD_LIBRARY_PATH
fi

$FS_BIN_DIR/ffloatsrv $ARGS $@

