#
# Copyright 2013 ForgeRock, Inc.
#
# 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 legal/CDDLv1.0.txt. See the License for
# the specific language governing permission and limitations under the License.
#
# When distributing Covered Software, include this CDDL Header Notice in each file
# and include the License file at 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 copyright [year] [name of copyright owner]".
#
echo "Java version 1.7 or higher required";
exit 1;
fi
# clean up left over pid files if necessary
rm -f "$OPENIDM_PID_FILE"
fi
trap - EXIT
exit
}
# resolve links - $0 may be a softlink
PRG="$0"
while [ -h "$PRG" ]; do
else
fi
done
# Get standard environment variables
# Only set OPENIDM_HOME if not already set
# Only set OPENIDM_PID_FILE if not already set
# Only set OPENIDM_OPTS if not already set
# Set JDK Logger config file if it is present and an override has not been issued
CLOPTS=""
JPDA=""
while [ "$1" ]; do
if [ "$1" = "jpda" ]; then
JPDA=$1
else
if [ "$1" = "-p" ] && [ "$2" ]; then
fi
fi
shift
done
if [ -z "$LOGGING_CONFIG" ]; then
else
LOGGING_CONFIG="-Dnop"
fi
fi
if [ "$JPDA" = "jpda" ] ; then
if [ -z "$JPDA_TRANSPORT" ]; then
JPDA_TRANSPORT="dt_socket"
fi
if [ -z "$JPDA_ADDRESS" ]; then
JPDA_ADDRESS="5005"
fi
if [ -z "$JPDA_SUSPEND" ]; then
JPDA_SUSPEND="n"
fi
if [ -z "$JPDA_OPTS" ]; then
JPDA_OPTS="-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
fi
fi
CLASSPATH="$OPENIDM_HOME/bin/*:$OPENIDM_HOME/framework/*"
echo "Using OPENIDM_HOME: $OPENIDM_HOME"
echo "Using PROJECT_HOME: $PROJECT_HOME"
echo "Using OPENIDM_OPTS: $OPENIDM_OPTS"
echo "Using LOGGING_CONFIG: $LOGGING_CONFIG"
# Keep track of this pid
echo $$ > "$OPENIDM_PID_FILE"
# Make the script location the current directory
cd "$PRGDIR"
# start in normal mode
-Djava.awt.headless=true \
}
while
do
continue;
done
# org.forgerock.commons.launcher.Main -c bin/launcher.json -w samples/sample1/cache -p samples/sample1 "$@"