Granting superuser to wrolpi during install so they can import maps.

This commit is contained in:
Roland 2023-02-25 18:43:40 -07:00
parent 9ea2effe7b
commit eadc0a7537
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 4 additions and 0 deletions

View file

@ -99,6 +99,8 @@ sudo -u postgres psql -c '\l' | grep wrolpi || (
sudo -u postgres psql -c "alter user wrolpi password 'wrolpi'" &&
sudo -u postgres createdb -E UTF8 -O wrolpi wrolpi
)
# wrolpi user is superuser so they can import maps.
sudo -u postgres psql -c "alter user wrolpi with superuser"
# Initialize/upgrade the WROLPi database.
(cd /opt/wrolpi && /opt/wrolpi/venv/bin/python3 /opt/wrolpi/main.py db upgrade)

View file

@ -94,6 +94,8 @@ sudo -u postgres psql -c '\l' | grep wrolpi || (
sudo -u postgres psql -c "alter user wrolpi password 'wrolpi'" &&
sudo -u postgres createdb -E UTF8 -O wrolpi wrolpi
)
# wrolpi user is superuser so they can import maps.
sudo -u postgres psql -c "alter user wrolpi with superuser"
# Initialize/upgrade the WROLPi database.
(cd /opt/wrolpi && /opt/wrolpi/venv/bin/python3 /opt/wrolpi/main.py db upgrade)