#!/bin/sh

# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
#
# The contents of this file are subject to the terms
# of the Common Development and Distribution License
# (the License). You may not use this file except in
# compliance with the License.
#
# You can obtain a copy of the License at
# https://opensso.dev.java.net/public/CDDLv1.0.html or
# opensso/legal/CDDLv1.0.txt
# See the License for the specific language governing
# permission and limitations under the License.
#
# When distributing Covered Code, include this CDDL
# Header Notice in each file and include the License file
# at opensso/legal/CDDLv1.0.txt.
# If applicable, add the following below the CDDL Header,
# with the fields enclosed by brackets [] replaced by
# your own identifying information:
# "Portions Copyrighted [year] [name of copyright owner]"
#
# $Id: ampassword,v 1.17 2009/01/28 05:34:45 ww203982 Exp $
#
#

# Portions Copyrighted 2010-2015 ForgeRock AS.

JAVA_HOME="/usr/lib/jvm/jre-1.8.0-openjdk"
TOOLS_HOME="/opt/osstech/share/openam13/ssoAdminTools"

CLASSPATH=""
CLASSPATH="$CLASSPATH:$TOOLS_HOME/lib/guice-assistedinject-3.0.jar:$TOOLS_HOME/lib/grizzly-framework-2.3.23.jar:$TOOLS_HOME/lib/opendj-server-legacy-3.0.0.jar:$TOOLS_HOME/lib/opendj-server-3.0.0.jar:$TOOLS_HOME/lib/opendj-config-3.0.0.jar:$TOOLS_HOME/lib/org.apache.servicemix.bundles.javax-inject-1_2.jar:$TOOLS_HOME/lib/commons-collections-3.2.1.jar:$TOOLS_HOME/lib/openam-shared-13.0.0.jar:$TOOLS_HOME/lib/forgerock-guava-collect-18.0.4.jar:$TOOLS_HOME/lib/commons-lang-2.6.jar:$TOOLS_HOME/lib/openam-license-core-13.0.0.jar:$TOOLS_HOME/lib/i18n-core-1.4.2.jar:$TOOLS_HOME/lib/openam-ldap-utils-13.0.0.jar:$TOOLS_HOME/lib/slf4j-nop-1.7.5.jar:$TOOLS_HOME/lib/chf-http-core-20.1.0.jar:$TOOLS_HOME/lib/forgerock-audit-core-20.1.0.jar:$TOOLS_HOME/lib/forgerock-util-20.1.0.jar:$TOOLS_HOME/lib/forgerock-guice-core-1.1.0.jar:$TOOLS_HOME/lib/xercesImpl-2.11.0.jar:$TOOLS_HOME/lib/joda-time-2.7.jar:$TOOLS_HOME/lib/openam-audit-configuration-13.0.0.jar:$TOOLS_HOME/lib/opendj-cli-3.0.0.jar:$TOOLS_HOME/lib/guice-3.0-no_aop.jar:$TOOLS_HOME/lib/openam-license-manager-cli-13.0.0.jar:$TOOLS_HOME/lib/openam-audit-context-13.0.0.jar:$TOOLS_HOME/lib/opendj-core-3.0.0.jar:$TOOLS_HOME/lib/slf4j-api-1.7.5.jar:$TOOLS_HOME/lib/xalan-2.7.1.jar:$TOOLS_HOME/lib/openam-entitlements-13.0.0.jar:$TOOLS_HOME/lib/opendj-grizzly-3.0.0.jar:$TOOLS_HOME/lib/xml-apis-2.11.0.jar:$TOOLS_HOME/lib/xmlsec-1.5.6.jar:$TOOLS_HOME/lib/openam-dtd-schema-13.0.0.jar:$TOOLS_HOME/lib/openam-core-13.0.0.jar:$TOOLS_HOME/lib/i18n-slf4j-1.4.2.jar:$TOOLS_HOME/lib/json-20090211.jar:$TOOLS_HOME/lib/forgerock-guava-base-18.0.4.jar"
CLASSPATH="$CLASSPATH:$TOOLS_HOME/resources"

$JAVA_HOME/bin/java -Xms64m -Xmx256m -classpath $CLASSPATH \
                      -D"bootstrap.dir=/opt/osstech/var/lib/tomcat/openam" -D"java.version.current=java.vm.version" \
                      -D"java.version.expected=1.4+" -D"am.version.current=com.iplanet.am.version" \
                      -D"am.version.expected=13.0.0"  \
                      com.iplanet.services.ldap.ServerConfigMgr "$@"
