springboot的jar包名称yjxtapp-0.0.1-SNAPSHOT.jar
启动脚本
#!/bin/sh
rm -f tpid
nohup java -jar /data/apk/yjxtapp-0.0.1-SNAPSHOT.jar &
echo $! > tpid
echo Start Success!
关闭脚本
#!/bin/bash
PID=$(ps -ef | grep yjxtapp-0.0.1-SNAPSHOT.jar | grep -v grep | awk ‘{ print $2 }‘)
if [ -z "$PID" ]
then
echo Application is already stopped
else
echo kill $PID
kill $PID
fi
注意编码UTF-8!
注意编码UTF-8!
注意编码UTF-8!
我被编码问题坑了一次,记一笔
原文:https://www.cnblogs.com/tiance/p/11598086.html