tools/scripts/publish_java/start_instance.sh
2020-02-29 13:47:16 +08:00

18 lines
402 B
Bash
Executable File

#!/bin/bash
source ./common.sh
mkdir -p logs
if [ -f "custom_init.sh" ]; then
source ./custom_init.sh
fi
if [[ IS_DEV_ENV -eq 1 ]]; then
java -jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=${DEBUG_SUSPEND},address=${DEBUG_PORT} \
${JAVA_OPTS} -Dinstance_id="$1" new_${JAR_NAME}
else
java -jar ${JAVA_OPTS} -Dinstance_id="$1" ${JAR_NAME} >> logs/app-$1.out 2>&1 &
fi