Skip to content

Commit

Permalink
bugfix: fix shenyu-admin-dist start.sh and shenyu-bootstrap-dist star…
Browse files Browse the repository at this point in the history
…t.sh (apache#1468)
  • Loading branch information
kenWu-github authored May 15, 2021
1 parent c777e5b commit d9668dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions shenyu-dist/shenyu-admin-dist/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ else
exit 1
fi

PRG_DIR=$(dirname "$0")
PRG_DIR=$(cd `dirname $0`; pwd)

APP="$PRG_DIR/../lib/shenyu-admin.jar"
BASE_DIR="$PRG_DIR/.."
BASE_DIR=$(cd $PRG_DIR/.. ; pwd)

APP="$BASE_DIR/lib/shenyu-admin.jar"

[[ -z "$LOG_DIR" ]] && LOG_DIR="$BASE_DIR/logs"
[[ -d "$LOG_DIR" ]] || mkdir -p "$LOG_DIR"
Expand Down Expand Up @@ -58,7 +59,7 @@ JAVA_GC_LOG_OPTS="-Xloggc:$LOG_DIR/gc.log"

JAVA_OPTS="$JAVA_OPTS $JAVA_MEM_OPTS $JAVA_GC_TUNE_OPTS $JAVA_GC_LOG_OPTS"

$JAVA -jar "$APP" --spring.config.location=file:"$BASE_DIR"/conf/ "$JAVA_OPTS" >> "${LOG_DIR}"/shenyu-admin.out &
$JAVA $JAVA_OPTS -jar $APP --spring.config.location=file:"$BASE_DIR"/conf/ >> "${LOG_DIR}"/shenyu-admin.out 2>&1 &

if [ $? -gt 0 ]; then
echo "Starting $APP ERROR"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ else
exit 1
fi

PRG_DIR=$(dirname "$0")
PRG_DIR=$(cd `dirname $0`; pwd)

APP="$PRG_DIR/../lib/shenyu-bootstrap.jar"
BASE_DIR="$PRG_DIR/.."
BASE_DIR=$(cd $PRG_DIR/.. ; pwd)

APP="$BASE_DIR/lib/shenyu-bootstrap.jar"

[[ -z "$LOG_DIR" ]] && LOG_DIR="$BASE_DIR/logs"
[[ -d "$LOG_DIR" ]] || mkdir -p "$LOG_DIR"
Expand Down Expand Up @@ -58,7 +59,7 @@ JAVA_GC_LOG_OPTS="-Xloggc:$LOG_DIR/gc.log"

JAVA_OPTS="$JAVA_OPTS $JAVA_MEM_OPTS $JAVA_GC_TUNE_OPTS $JAVA_GC_LOG_OPTS"

$JAVA -jar "$APP" --spring.config.location=file:"$BASE_DIR"/conf/ "$JAVA_OPTS" >> "${LOG_DIR}"/shenyu-bootstrap.out &
$JAVA $JAVA_OPTS -jar $APP --spring.config.location=file:"$BASE_DIR"/conf/ >> "${LOG_DIR}"/shenyu-bootstrap.out 2>&1 &

if [ $? -gt 0 ]; then
echo "Starting $APP ERROR"
Expand Down

0 comments on commit d9668dc

Please sign in to comment.