Повторение материала и проверка знаний работников по направлениям деятельности
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# подключаемся от пользователя exam к базе exam
|
|
|
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
|
|
|
CREATE USER moodle WITH PASSWORD 'moodle';
|
|
|
|
CREATE DATABASE moodle;
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE moodle TO moodle;
|
|
|
|
EOSQL
|
|
|
|
|
|
|
|
|
|
|
|
# \c moodle
|
|
|
|
# подключаемся от пользователя exam к базе moodle
|
|
|
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "moodle" <<-EOSQL
|
|
|
|
GRANT ALL PRIVILEGES ON SCHEMA public TO moodle;
|
|
|
|
EOSQL
|