no message

main
HUOJIN\92525 2023-09-20 15:32:11 +08:00
parent 577bfe147a
commit ad3aea0596
3 changed files with 16 additions and 2 deletions

View File

@ -233,7 +233,6 @@ else
echo kill -9 $PID echo kill -9 $PID
kill -9 $PID kill -9 $PID
fi fi
``` ```
# **查看日志脚本** # **查看日志脚本**
@ -272,11 +271,14 @@ root /home/ubuntu/dist/ #dist上传的路径
Linux 常用命令 Linux 常用命令
``` ```
切换文件夹:cd ../../ 切换文件夹:cd ../../
查看命令:sudo vim nginx.conf 查看命令:sudo vim nginx.conf
启动java服务:sudo sh ./start.sh
停止java服务:sudo sh ./stop.sh
启动mysql服务:sudo systemctl start mysqld 启动mysql服务:sudo systemctl start mysqld
停止mysql服务:sudo systemctl stop mysqld 停止mysql服务:sudo systemctl stop mysqld

View File

@ -0,0 +1,2 @@
nohup java -jar youchain-system-2.6.jar --spring.profiles.active=prod > nohup.out 2>&1 &

View File

@ -0,0 +1,10 @@
#!bin/sh
PID=$(ps -ef | grep youchain-system-2.6.jar | grep -v grep | awk '{ print $2 }')
if [ -z "$PID" ]
then
echo Application is already stopped
else
echo kill -9 $PID
kill -9 $PID
fi