启动脚本中的 参数 [-jar] 和参数值 [AppName] 对应写到一起

This commit is contained in:
lixifun
2021-09-27 14:13:26 +08:00
parent 61007b2905
commit c11ac2e565
2 changed files with 14 additions and 14 deletions

4
ry.sh
View File

@ -30,7 +30,7 @@ function start()
if [ x"$PID" != x"" ]; then
echo "$AppName is running..."
else
nohup java -jar $JVM_OPTS target/$AppName > /dev/null 2>&1 &
nohup java $JVM_OPTS -jar $AppName > /dev/null 2>&1 &
echo "Start $AppName success..."
fi
}
@ -38,7 +38,7 @@ function start()
function stop()
{
echo "Stop $AppName"
PID=""
query(){
PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`