#!/bin/bash #start.sh echo "======== start project begin ========" JAR_FILE=$HOME/topo/tax-topo/tax-topo.jar JAR_LOG=$HOME/topo/tax-topo/nohup.log PID_NAME=tax-topo.jar if [ `ps -ef |grep $PID_NAME |grep -v grep |wc -l` -ge 1 ];then echo "please kill $PID_NAME process, Try to start the script again." exit 1 fi nohup java -Xms1536m -Xmx1536m -XX:MaxPermSize=1536m -jar $JAR_FILE >$JAR_LOG 2>&1 & echo "======== start project end ========" tail -f $JAR_LOG