mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-30 23:40:08 +00:00
add a check for init-user-db.sh
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
touch /mnt/data/initdb.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 /mnt/data/initdb.failed
|
||||
|
||||
set +ex
|
||||
|
||||
Reference in New Issue
Block a user