eole-risotto/posttemplate/10-fix-postgresql-permissions

17 lines
604 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
set -e
systemctl start postgresql.service
psql -Upostgres -c "grant all on all tables in schema public to risotto" risotto
psql -Upostgres -c "grant all on all sequences in schema public to risotto" risotto
psql -Upostgres -c "grant all on all functions in schema public to risotto" risotto
psql -Upostgres -c "grant all on all tables in schema public to tiramisu" tiramisu
psql -Upostgres -c "grant all on all sequences in schema public to tiramisu" tiramisu
psql -Upostgres -c "grant all on all functions in schema public to tiramisu" tiramisu
systemctl stop postgresql.service
exit 0