mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-11-11 09:23:36 +08:00
ee50e9147d
Signed-off-by: Simon L <szaimen@e.mail.de>
13 lines
339 B
Bash
13 lines
339 B
Bash
#!/bin/bash
|
|
set -ex
|
|
|
|
touch "$DUMP_DIR/initialization.failed"
|
|
|
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
|
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD '$POSTGRES_PASSWORD' CREATEDB;
|
|
ALTER DATABASE "$POSTGRES_DB" OWNER TO "oc_$POSTGRES_USER";
|
|
EOSQL
|
|
|
|
rm "$DUMP_DIR/initialization.failed"
|
|
|
|
set +ex
|