cas4/start.sh
Shaun Chyxion 6bc6f8ea5f database
2022-01-05 00:58:57 +08:00

38 lines
897 B
Bash
Executable File

#!/bin/bash
#!/bin/bash
# get real path of softlink
get_real_path() {
local f="$1"
while [ -h "$f" ]; do
ls=`ls -ld "$f"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
f="$link"
else
f=`dirname "$f"`/"$link"
fi
done
echo "$f"
}
prg_path=$(get_real_path "$0")
echo "Script path [$prg_path]"
# Service Home
pushd $(dirname "$prg_path") > /dev/null
WORK_DIR=$(pwd)
echo "Work dir [$WORK_DIR]"
mvn -T 4C -DskipTests clean \
spring-boot:run \
-Dspring-boot.run.jvmArguments='-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000' \
-Dspring-boot.run.arguments="--spring.main.banner-mode=OFF
--spring.config.location=file://$WORK_DIR/cas.properties
--logging.config=$WORK_DIR/log4j2.xml" \
-Dspring-boot.run.fork=false
popd > /dev/null