start.sh 脚本
port=8080
pid=$(netstat -nlp | grep :$port | awk '{print $7}' | awk -F"/" '{print $1}');
if [ -n "$pid" ]; then
kill -9 $pid;
fi
#一定要加这一句,否则会报 nohup: failed to run command `java': No such file or directory错误
source /etc/profile;
nohup java -jar demo-v1.jar >> demo.log 2>&1 &