Skip to content
Snippets Groups Projects
Commit 51a02409 authored by Raphael's avatar Raphael
Browse files

Another try at script server fix

parent 0c5d1972
No related branches found
No related tags found
No related merge requests found
......@@ -7,19 +7,20 @@
PORT=3000
while getopts ":p:" OPTION
do
if OPTION='p'
if [ $OPTION == 'p' ]
then
PORT=$OPTARG
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
}
exit
# Check if Mongo is running
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment