mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
fix database import
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
badd8d02a9
commit
3887275808
2 changed files with 2 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
|||
set -ex
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD "$POSTGRES_PASSWORD";
|
||||
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD '$POSTGRES_PASSWORD';
|
||||
GRANT ALL PRIVILEGES ON DATABASE "$POSTGRES_DB" TO "oc_$POSTGRES_USER";
|
||||
EOSQL
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
|
|||
|
||||
# Restore database
|
||||
echo "Restoring the database from database dump"
|
||||
psql "$POSTGRES_DB" -U "$POSTGRES_USER" < "$DUMP_FILE"
|
||||
psql "$POSTGRES_DB" -U "oc_$POSTGRES_USER" < "$DUMP_FILE"
|
||||
|
||||
# Shut down the database to be able to start it again
|
||||
pg_ctl stop -m fast
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue