diff --git a/dist/src/main/bin/springboot.sh b/dist/src/main/bin/springboot.sh index 97394fee2b4..a174a9ea854 100755 --- a/dist/src/main/bin/springboot.sh +++ b/dist/src/main/bin/springboot.sh @@ -17,7 +17,10 @@ SCRIPT_PATH=$(cd $(dirname "$0") && pwd -P)/$(basename "$2") USE_NOHUP="true" -JAVA_OPTS="$JAVA_OPTS -Xms2048M -Xmx2048M -XX:PermSize=128m -XX:MaxPermSize=256m -Dmidpoint.home=$SCRIPT_PATH../var" +if [ -z "$MIDPOINT_HOME" ] ; then + MIDPOINT_HOME="$SCRIPT_PATH../var" +fi +JAVA_OPTS="$JAVA_OPTS -Xms2048M -Xmx2048M -XX:PermSize=128m -XX:MaxPermSize=256m -Dmidpoint.home=$MIDPOINT_HOME" # resolve links - $0 may be a softlink PRG="$0" @@ -35,7 +38,7 @@ done # Get standard environment variables PRGDIR=`dirname "$PRG"` -cd "$PRGDIR/.." >/dev/null; pwd +cd "$PRGDIR/.." >/dev/null cd "$SCRIPT_PATH/.." @@ -44,8 +47,7 @@ if [ ! -d var ] ; then mkdir var/log fi -if [ -z "$BOOT_OUT" ] ; then - +if [ -z "$BOOT_OUT" ] ; then BOOT_OUT="$SCRIPT_PATH"../var/log/springboot.out fi @@ -88,13 +90,14 @@ if [ "$USE_NOHUP" = "true" ]; then _NOHUP=nohup fi + # ----- Execute The Requested Command ----------------------------------------- -if [ $have_tty -eq 1 ]; then - if [ ! -z "$SPRING_PID" ]; then - echo "Using SPRING_PID: $SPRING_PID" - fi -fi +#if [ $have_tty -eq 1 ]; then +# if [ ! -z "$SPRING_PID" ]; then +# echo "Using SPRING_PID: $SPRING_PID" +# fi +#fi if [ "$1" = "start" ] ; then if [ ! -z "$SPRING_PID" ]; then @@ -140,6 +143,9 @@ if [ $? != 0 ]; then shift touch "$BOOT_OUT" +echo "Starting midPoint..." +echo "MIDPOINT_HOME=$MIDPOINT_HOME" + cd eval $_NOHUP "\"$_RUNJAVA\"" -jar $LOGGING_MANAGER $JAVA_OPTS \ $SCRIPT_PATH../lib/midpoint.war \ @@ -150,7 +156,6 @@ if [ ! -z "$SPRING_PID" ]; then echo $! > "$SPRING_PID" fi - echo "Starting midPoint..." elif [ "$1" = "stop" ] ; then