Verified Commit 9d5d9886 authored by Xueshan Feng's avatar Xueshan Feng
Browse files

test empty port string.

parent 705567c8
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
#!/bin/bash -e
port=$1
if pgrep -f $1 &> /dev/null
if [[ ! -z "$port" ]] &&  pgrep -f $port &> /dev/null
then
    kill $(pgrep -f 8001)
    echo Killed process on port $1
    kill $(pgrep -f $port  )
    echo Killed process on port $port
else
   echo "No process on port $1."
   echo "No process on port $port."
fi
exit 0