#!/bin/bash

#
# InitWitangoEnv
# Use this procedure to set all environment variables to be used by the witangod process
#
InitWitangoEnv ()
{
	# Set up environment for Witango server
	#
	umask 022
	export WITANGO_USER=witango
	export WITANGO_PATH=/usr/local/WitangoServer/5.5
	export WITANGO_CONFIG=$WITANGO_PATH/configuration

	# Set up environment for Java Virtual Machine
	#
	export JAVA_HOME=/usr/java/jre1.5.0_04
	export JAVA_LIB=$JAVA_HOME/lib/i386

	# Set up general environment variables
	#
	export LD_LIBRARY_PATH=$WITANGO_PATH:$JAVA_LIB:$JAVA_LIB/client:$JAVA_LIB/server:/usr/local/lib:/usr/lib
	#export DYLD_LIBRARY_PATH=$WITANGO_PATH:/usr/lib:/usr/local/lib
	exportPATH=$WITANGO_PATH:$JAVA_BINDIR:$PATH:/usr/local/bin:/usr/bin
	exportLC_ALL=en_US
	# export LD_LIBRARY_PATH=$WITANGO_PATH:/usr/lib:/usr/local/lib:$JAVA_LIB/client:$JAVA_LIB/server
	
	
	#Add the paths to the JDBC jar files to the CLASSPATH
	export CLASSPATH=$WITANGO_PATH/lsjdbc50.jar:$WITANGO_PATH:$WITANGO_PATH/jdbc_drivers/
	
	# Set up environment for ODBC driver manager
	#
	export ODBCINI=/etc/ODBC/odbc.ini
	export ODBCINSTINI=/etc/ODBC/odbcinst.ini	
}


InitWitangoEnv
$WITANGO_PATH/witangod -uo
