修改包名,统一成coscoshipping
添加了登录成功后存储cacheUser信息至redis 新增部署后启动脚本app.sh
This commit is contained in:
59
app.sh
Normal file
59
app.sh
Normal file
@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP_NAME="sys_manager_ebtp_project-0.0.1.jar"
|
||||
APP_PORT=18030
|
||||
LOG_FILE="app.log"
|
||||
PID_FILE="app.pid"
|
||||
|
||||
start() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
echo "应用已经在运行中,PID: $(cat $PID_FILE)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "正在启动应用..."
|
||||
nohup java -jar $APP_NAME --spring.config.location=application-sim.yml > $LOG_FILE 2>&1 &
|
||||
echo $! > $PID_FILE
|
||||
echo "应用已启动,PID: $(cat $PID_FILE)"
|
||||
}
|
||||
|
||||
stop() {
|
||||
if [ ! -f "$PID_FILE" ]; then
|
||||
echo "应用未运行"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "正在停止应用,PID: $(cat $PID_FILE)..."
|
||||
kill -9 $(cat $PID_FILE)
|
||||
rm -f $PID_FILE
|
||||
echo "应用已停止"
|
||||
}
|
||||
|
||||
status() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
echo "应用正在运行,PID: $(cat $PID_FILE)"
|
||||
else
|
||||
echo "应用未运行"
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
status)
|
||||
status
|
||||
;;
|
||||
*)
|
||||
echo "使用方法: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user