Merge pull request #226 from nextcloud/enh/noid/fix-database-import

fix database import
This commit is contained in:
Simon L 2022-02-15 17:44:36 +01:00 committed by GitHub
commit 4359792a48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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