#!/usr/bin/sh

APPHOME=$(realpath $(dirname "$0"))

export JAVA_HOME=$APPHOME/jre
export PATH=$JAVA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$APPHOME/native_lib:$LD_LIBRARY_PATH

APPDATADIR=$APPHOME/MoldSignData/Server
APPLOGDIR=$APPHOME/log
MAINJAR=$APPHOME/lib/ClientCardServer-2.0.jar
APPOPTIONS="-DMoldSign.TempDir=$APPLOGDIR -Dmd.cts.moldsign.home_dir=$APPDATADIR -Djava.util.logging.config.file=$APPDATADIR/logging.properties"

cd $APPHOME
java $APPOPTIONS -jar $MAINJAR </dev/null 2>$APPLOGDIR/err_server.log 1>$APPLOGDIR/out_server.log
