start-app-nohub.sh
#/bin/bash
pid=`netstat -anp|grep 8080|awk '{printf $7}'|cut -d/ -f1`
if [ ! $pid ] ;then
echo "端口未被占用"
else
echo "占用端口8080进程PID为: $pid"
result=`kill -9 $pid`
#echo "result = $result"
rm -f test_console.log
fi
nohup java -jar test-console.jar >> test_console.log 2>&1 &