mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-12-27 09:10:58 +08:00
add new commands
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
9065e07a23
commit
7c3ac06b49
2 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,8 @@ touch "$DUMP_DIR/initialization.failed"
|
||||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
|
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
|
||||||
ALTER DATABASE "$POSTGRES_DB" OWNER TO "oc_$POSTGRES_USER";
|
ALTER DATABASE "$POSTGRES_DB" OWNER TO "oc_$POSTGRES_USER";
|
||||||
|
GRANT ALL PRIVILEGES ON DATABASE "$POSTGRES_DB" TO "oc_$POSTGRES_USER";
|
||||||
|
GRANT ALL PRIVILEGES ON SCHEMA public TO "oc_$POSTGRES_USER";
|
||||||
EOSQL
|
EOSQL
|
||||||
|
|
||||||
rm "$DUMP_DIR/initialization.failed"
|
rm "$DUMP_DIR/initialization.failed"
|
||||||
|
|
|
@ -110,6 +110,8 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
|
||||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
CREATE USER "$DB_OWNER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
|
CREATE USER "$DB_OWNER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
|
||||||
ALTER DATABASE "$POSTGRES_DB" OWNER TO "$DB_OWNER";
|
ALTER DATABASE "$POSTGRES_DB" OWNER TO "$DB_OWNER";
|
||||||
|
GRANT ALL PRIVILEGES ON DATABASE "$POSTGRES_DB" TO "$DB_OWNER";
|
||||||
|
GRANT ALL PRIVILEGES ON SCHEMA public TO "$DB_OWNER";
|
||||||
EOSQL
|
EOSQL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue