liljudd-website/kill-running-server.sh

6 lines
165 B
Bash
Raw Normal View History

#!/bin/bash
# This script checks if a process is running on port 3000 and kills it if it's found
lsof -i TCP:3000 | grep LISTEN | awk '{print $2}' | xargs kill -9