#!/bin/sh

# Licensed Materials - Property of IBM
# IBM Cognos Products: XQE
# (C) Copyright IBM Corp. 2013, 2022
# US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

OS_NAME=`uname`
CWD=$PWD
SEP=":"

case "$OS_NAME" in
  "Linux"|"SunOS") 
    LD_LIBRARY_PATH=$CWD:$CWD/bind:$CWD/lib
    export LD_LIBRARY_PATH 
    ;;  
  "AIX") export LIBPATH=$CWD:$CWD/bind:$CWD/lib
    ;;
  "HP-UX") export SHLIB_PATH=$CWD:$CWD/bind:$CWD/lib
    ;;   
  "Windows_NT") SEP=";"
    ;;
esac

CLASSPATH="../webapps/p2pd/WEB-INF/classes$SEP../webapps/p2pd/WEB-INF/lib/xqeService.jar$SEP../webapps/p2pd/WEB-INF/lib/cclcfgapi.jar$SEP../webapps/p2pd/WEB-INF/lib/jaxen-1.1.1.jar$SEP../webapps/p2pd/WEB-INF/lib/dom4j-2.1.1.jar$SEP../webapps/p2pd/WEB-INF/lib/commons-configuration-1.9.jar$SEP../webapps/p2pd/WEB-INF/lib/commons-beanutils.jar$SEP../webapps/p2pd/WEB-INF/lib/commons-lang-2.6.jar$SEP../webapps/p2pd/WEB-INF/lib/commons-logging-1.1.jar$SEP../webapps/p2pd/WEB-INF/lib/commons-collections-3.2.1.jar$SEP../webapps/p2pd/WEB-INF/lib/commons-httpclient-3.1.jar$SEP../webapps/p2pd/WEB-INF/lib/commons-codec.jar$SEP../webapps/p2pd/WEB-INF/lib/CognosIPF.jar$SEP../webapps/p2pd/WEB-INF/lib/log4j-api-2.17.1.jar$SEP../webapps/p2pd/WEB-INF/lib/log4j-core-2.17.1.jar$SEP../webapps/p2pd/WEB-INF/lib/jcam_crypto.jar$SEP../webapps/p2pd/WEB-INF/lib/jcam_jni.jar$SEP../webapps/p2pd/WEB-INF/lib/CognosCCL4J.jar$SEP../webapps/p2pd/WEB-INF/lib/p2pd.jar$SEP../bin/slf4j-api-1.7.35.jar$SEP../webapps/p2pd/WEB-INF/lib/bcprov.jar$SEP../webapps/p2pd/WEB-INF/lib/bcpkix.jar"

$JAVA_HOME/bin/java -cp "$CLASSPATH" com.cognos.xqe.util.KerberosSSOLoginHelper "$@"