Created
August 22, 2023 02:44
-
-
Save johnsosoka/d5d53c62718b644f0d4e14a9ad7459be to your computer and use it in GitHub Desktop.
kills jekyll...or whatever is running on port 4000
This file contains hidden or 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 | |
| # Find the process ID of Jekyll running on port 4000 | |
| jekyll_pid=$(lsof -i tcp:4000 -t) | |
| # Check if the process ID is found | |
| if [ -n "$jekyll_pid" ]; then | |
| echo "Jekyll is running with PID $jekyll_pid. Killing the process..." | |
| # Kill the process | |
| kill -9 $jekyll_pid | |
| echo "Jekyll process has been killed." | |
| else | |
| echo "Jekyll is not running." | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment