chore
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 本脚本的作用是停止当前Spring Boot应用,然后再次部署
|
||||
sudo service litemall stop
|
||||
sudo ln -f -s /home/ubuntu/deploy/litemall/litemall.jar /etc/init.d/litemall
|
||||
sudo update-rc.d litemall defaults
|
||||
sudo update-rc.d litemall enable
|
||||
sudo service litemall start
|
||||
PID=$(ps -ef | grep litemall.jar | grep -v grep | awk '{ print $2 }')
|
||||
|
||||
if [ ! -z "$PID" ]
|
||||
then
|
||||
kill $PID
|
||||
fi
|
||||
|
||||
cd /home/ubuntu/deploy/litemall || exit 2
|
||||
nohup java -jar litemall.jar > log.log 2>&1 &
|
||||
@@ -28,4 +28,5 @@ rm -f ./**
|
||||
|
||||
# 重新部署服务
|
||||
cd /home/ubuntu/deploy/bin || exit 2
|
||||
sudo ./stop.sh
|
||||
sudo ./deploy.sh
|
||||
8
deploy/bin/stop.sh
Normal file
8
deploy/bin/stop.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
PID=$(ps -ef | grep litemall.jar | grep -v grep | awk '{ print $2 }')
|
||||
|
||||
if [ ! -z "$PID" ]
|
||||
then
|
||||
kill $PID
|
||||
fi
|
||||
Reference in New Issue
Block a user