Got port check in bash script working

This commit is contained in:
Raphael 2010-10-13 10:47:21 -07:00
parent 3f9a51fa3f
commit 9e27c802c3

View file

@ -13,10 +13,11 @@ do
fi
done
services=$( netstat -nl | grep '[^:]:'+ $PORT +'[ \t]')
services=$( netstat -nl | grep '[^:]:'$PORT'[ \t]')
test -n "$services" && {
echo "Warning: something is already using port " + $PORT
echo " $services"
exit
}