Skip to content

Instantly share code, notes, and snippets.

@harisfi
Last active October 27, 2022 15:26
Show Gist options
  • Save harisfi/4065f0e5a60ffb7cf8a132358f41a4d6 to your computer and use it in GitHub Desktop.
Save harisfi/4065f0e5a60ffb7cf8a132358f41a4d6 to your computer and use it in GitHub Desktop.
Script for starting and stopping postgresql service and pgadmin4

Script for starting and stopping postgresql service and pgadmin4

Place code below in pgadmin4 directory, set each file permission to executable, and you can use it.


start.sh

#!/bin/sh

sudo systemctl start postgresql
sudo systemctl enable postgresql
systemctl status postgresql

python3 -m venv pgadmin4
source bin/activate
pgadmin4

stop.sh

#!/bin/sh

sudo systemctl stop postgresql
sudo systemctl disable postgresql
systemctl status postgresql

Nb: If you don't have postgresql and pgadmin4, you can follow the instruction from this page (for manjaro user)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment