mirror of
https://gitee.com/novel_dev_team/novel-plus
synced 2026-07-20 17:54:59 +08:00
perf(linux): 支持从任意路径执行启动脚本
- 使用 readlink 定位脚本真实路径 - 启动时自动切换到项目目录
This commit is contained in:
@@ -5,9 +5,12 @@ JAR_NAME=$APP_NAME\.jar
|
||||
PID=$APP_NAME\.pid
|
||||
|
||||
|
||||
#使用说明,用来提示输入参数
|
||||
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
|
||||
cd "$SCRIPT_DIR"/.. || exit 1
|
||||
|
||||
# 使用说明
|
||||
usage() {
|
||||
echo "Usage: ./novel-admin.sh [start|stop|restart|status]"
|
||||
echo "Usage: $0 [start|stop|restart|status]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
@@ -5,9 +5,12 @@ JAR_NAME=$APP_NAME\.jar
|
||||
PID=$APP_NAME\.pid
|
||||
|
||||
|
||||
#使用说明,用来提示输入参数
|
||||
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
|
||||
cd "$SCRIPT_DIR"/.. || exit 1
|
||||
|
||||
# 使用说明
|
||||
usage() {
|
||||
echo "Usage: ./novel-crawl.sh [start|stop|restart|status]"
|
||||
echo "Usage: $0 [start|stop|restart|status]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
@@ -4,10 +4,12 @@ JAR_NAME=$APP_NAME\.jar
|
||||
#PID 代表是PID文件
|
||||
PID=$APP_NAME\.pid
|
||||
|
||||
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
|
||||
cd "$SCRIPT_DIR"/.. || exit 1
|
||||
|
||||
#使用说明,用来提示输入参数
|
||||
# 使用说明
|
||||
usage() {
|
||||
echo "Usage: ./novel-front.sh [start|stop|restart|status]"
|
||||
echo "Usage: $0 [start|stop|restart|status]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user