#!/bin/sh ESOURCE_NAME=sch-coupons-1.0-SNAPSHOT.jar tpid=`ps -ef | grep java | grep $ESOURCE_NAME |awk '{print $2}'` if [ ${tpid} ]; then echo 'App is running.' else echo 'App is NOT running.' fi rm -f tpid nohup java -Xms1024m -Xmx1536m -XX:PermSize=64m -XX:MaxPermSize=512m -jar ./sch-coupons-1.0-SNAPSHOT.jar --spring.profiles.active=prod > ./2022.log 2>&1 & # 不输出日志 # nohup java -Xms128m -Xmx1024m -jar xxx.jar >/dev/null 2>&1 & echo $! > tpid echo Start Success!