mirror of
https://gitee.com/kennylee/docker.git
synced 2024-11-29 18:38:34 +08:00
19 lines
463 B
Bash
19 lines
463 B
Bash
#! /bin/bash
|
|
|
|
BASE_PATH=/data/app/
|
|
ORI_APP_FILE=$(find $BASE_PATH -type f -name "*.jar" 2>/dev/null | head -1)
|
|
APP_FILE=${BASE_PATH}app.jar
|
|
|
|
if [ ${#ORI_APP_FILE} -gt 0 ]; then
|
|
echo "create symbolic link for $ORI_APP_FILE"
|
|
if [ -e $APP_FILE ]; then
|
|
#echo "$APP_FILE was existed, remove that."
|
|
rm -f $APP_FILE
|
|
fi
|
|
ln -s $ORI_APP_FILE $APP_FILE
|
|
fi
|
|
|
|
# if $APP_FILE not exist, let it throw error。
|
|
java $JAVA_OPTS -jar $APP_FILE "$@"
|
|
|