Skip to content

Commit

Permalink
Add kill_server function
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinSuttle committed Jun 22, 2015
1 parent 020a64b commit 37b6161
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fish/functions/kill_server.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function kill_server --argument port
for pid in (lsof -i TCP:$port | awk '/LISTEN/{print $2}')
echo -n "Found server for port $port with pid $pid: "
kill -9 $pid; and echo "killed."; or echo "could not kill."
end
end

0 comments on commit 37b6161

Please # to comment.