port=`lsof -i:8080 | wc -l`
if [ "$port" -eq "0" ];then
      echo "未启动"
else
      echo "已经启动" 
fi

相关文章: