#!/bin/bash

# This script is used to create a special HSC user

if [ "$1" = "" -o "$2" = "" ]; then
   echo  "ERROR: This script requires two input arguments..."
   exit 2
fi

export PATH=/opt/IBMJava/jre/bin:$PATH

if [ "${DEBUG_JARS_DIRECTORY}" != "" ] ; then
  if [ -d ${DEBUG_JARS_DIRECTORY} ] ; then
    for i in ${DEBUG_JARS_DIRECTORY}/*.jar
    do
       debug_jars=${debug_jars}:$i
    done
  fi
fi

export CLASSPATH=${DEBUG_JARS_DIRECTORY}:${debug_jars}:/usr/websm/codebase/pluginjars/aca.jar:/usr/websm/codebase/pluginjars/aca.jar:/usr/websm/codebase/pluginjars/hsc.jar:/usr/websm/codebase/pluginjars/hsc_bundles.jar:/usr/websm/codebase/wsm.jar:/usr/websm/codebase/log.jar:$CLASSPATH

echo "Creating an User...."

java -Xms20m -Xmx128m com.ibm.hsc.command.CreateHSCUser $1 $2

