#!/bin/bash port=8011 pid=$(netstat -nlp | grep :$port | awk '{print $7}' | awk -F"/" '{ print $1 }'); echo $pid if [ -n "$pid" ]; then kill -9 $pid fi java -jar allinone-0.0.1-SNAPSHOT.jar > csm.log & exit