Skip to content
Snippets Groups Projects
Commit 4f2bb34a authored by Alexander König's avatar Alexander König
Browse files

changes to make dspace user name configurable through ENV variable

parent a6d3ddc2
Branches
Tags
No related merge requests found
......@@ -4,5 +4,5 @@ git clone https://github.com/commul/clarin-dspace.git -b commul-custom /tmp/dspa
cp /tmp/dspace/utilities/utilities.sql /tmp/sql/
cp /tmp/dspace/utilities/license_definition.txt /tmp/sql/
perl -pi -e "s#afile :utildir '/license_definition.txt'#afile '/tmp/sql/license_definition.txt'#;" /tmp/sql/utilities.sql
# perl -pi -e 's/\$DSPACE_USER/$ENV{DSPACE_USER}/;' /tmp/sql/utilities.sql
# rm -rf /tmp/dspace
#perl -pi -e 's/\$DSPACE_USER/$ENV{DSPACE_USER}/g;' /tmp/sql/utilities.sql
rm -rf /tmp/dspace
#!/bin/bash
set -e
# adapt utilities.sql with dspace username from env variable
perl -pi -e 's/\$DSPACE_USER/$ENV{DSPACE_USER}/g;' /tmp/sql/utilities.sql
# populate postgres databases
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
CREATE USER $DSPACE_USER WITH PASSWORD '$DSPACE_PASSWORD';
CREATE DATABASE "$DSPACE_DBNAME" OWNER $DSPACE_USER ENCODING "UTF-8" TEMPLATE template0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment