Created
July 10, 2013 15:09
-
-
Save hyphenPaul/5967097 to your computer and use it in GitHub Desktop.
Kills local process listening on port 3000. I use this to kill my detached development server on http://0.0.0.0:3000.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# kills any process listening on port 3000 | |
KILLPID=`lsof -t -i :3000` | |
if [ -z $KILLPID ]; then | |
echo "Nothing listening on port 3000" | |
else | |
kill -9 $KILLPID | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment