This script will manage a user-run postgres database. The main idea here is to run Postgres on a system where you don't have root access (and don't want root access). If you can not install Postgres through the system (or docker), then this is one way to still be able to use the database, even if you can't start it as a service.
-
Create a database and initialize it with a user login
./db.sh initdb dbname username userpass
-
Start/stop the database