mnml/bin/db.sh
2019-08-18 17:58:58 +10:00

10 lines
270 B
Bash
Executable File

#!/bin/bash
# POSTGRES SETUP
sudo -u postgres createdb mnml
sudo -u postgres createuser --encrypted mnml
PG_PASSWORD=$(openssl rand -hex 16)
echo "database password is $PG_PASSWORD"
sudo -u -E postgres psql -c "alter user mnml with encrypted password '$PG_PASSWORD';"