startup.sh revision 660a40ad15749d74efa0dd4ef12cb8781c570e22
# clean up left over pid files if necessary
if [ -f $OPENIDM_PID_FILE ]; then
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
echo $PRG
# Get standard environment variables
# Make the script location the current directory
cd $PRGDIR
# 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
if [ -z "$LOGGING_CONFIG" ]; then
else
LOGGING_CONFIG="-Dnop"
fi
fi
if [ "$1" = "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
shift
fi
CLASSPATH="$OPENIDM_HOME/bin/*:$OPENIDM_HOME/framework/*"
echo "Using OPENIDM_HOME: $OPENIDM_HOME"
echo "Using OPENIDM_OPTS: $OPENIDM_OPTS"
echo "Using LOGGING_CONFIG: $LOGGING_CONFIG"
# Keep track of this pid
echo $$ > $OPENIDM_PID_FILE
# start in normal mode
-classpath "$CLASSPATH" \
# org.forgerock.commons.launcher.Main -c bin/launcher.json -w samples/sample1/cache -p samples/sample1 "$@"