Created
June 4, 2020 06:38
-
-
Save vegaasen/a79b4cdeee6c0085ce771bdcf2c6f02c to your computer and use it in GitHub Desktop.
Stop any "seemingly" running instances of postgres through Brew on Mac
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
echo "Stopping existing (perhaps) running Postgres.." | |
brew services stop [email protected] | |
if [ ! -f /usr/local/var/postgresql\@9.5/postmaster.pid ]; then | |
echo "π Ops, cannot unfuck Postgres. The file does not exists??? (postmaster.pid)"; | |
echo "Try to restart and see if that helps? ===> brew services start [email protected] <===...amazingly this will also be happening right... NOW!" | |
brew services restart [email protected] | |
exit 1; | |
fi | |
echo "β‘οΈ Unfucking Postgres..."; | |
rm /usr/local/var/postgresql\@9.5/postmaster.pid; | |
echo "π Unfucked Postgres.."; | |
echo "π₯ Restarting postgres locally, as it might be effed up too.." | |
brew services start [email protected] | |
echo "β Postgres running again! .. maybe. Check the list below:" | |
brew services list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replace this version with whatever you have... :)