Created
May 7, 2020 21:23
-
-
Save morenitux/e7d595938b947ba4e695f4592205e947 to your computer and use it in GitHub Desktop.
Small script to initialize pgadmin and turn it off. -Used only in case it was installed using pgAdmin 4 (Python Wheel)
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 | |
if [ "$1" == "start" ]; then | |
firefox -new-tab http://localhost:5050/browser/ | |
python3 ~/.local/lib/python3.8/site-packages/pgadmin4/pgAdmin4.py | |
else | |
if [ "$1" == "stop" ];then | |
kill -9 $(ps -ef | grep '/.local/lib/python3.8/site-packages/pgadmin4/pgAdmin4.py' | awk 'NR==1 {print $2; exit}') | |
echo 'pgadmin4 closed.' | |
else | |
echo 'Check args, something es bad...' | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment