I've created a more copy/paste friendly Linux install script that removes the need for using whoami:
(
# Update package list
sudo apt-get update
# Install postgresql and postgresql-contrib (additional modules such as UUID)
sudo apt-get -y install postgresql postgresql-contrib
# Set a shell variable to currently logged in user
PSQL_MY_USERNAME=$(whoami)
# Create a new postgres user for the currently logged in user
sudo -u postgres createuser $PSQL_MY_USERNAME
# Create a new postgres user for the currently logged in user
sudo -u postgres createdb $PSQL_MY_USERNAME
);
Maybe PSQL_MY_USERNAME=$(whoami) could be added to the existing instructions, or the Linux section could be replaced with a single code block to be more copy/paste friendly?
I've created a more copy/paste friendly Linux install script that removes the need for using whoami:
Maybe
PSQL_MY_USERNAME=$(whoami)
could be added to the existing instructions, or the Linux section could be replaced with a single code block to be more copy/paste friendly?