Commit 8d14aeb5 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '1234-access-to-db-properties-file' into 'master'

Resolve "access to db.properties file"

See merge request !1352
parents ad4ce956 adfa482e
Pipeline #47271 failed with stage
in 37 minutes and 34 seconds
......@@ -4,6 +4,8 @@ minerva (16.1.0~alpha.0) stable; urgency=medium
* Small improvement: map file for JavaScript is properly referenced (#1545)
* Small improvement: z-index for modification residues and structural states
is imported from SBML file if available
* Small improvement: debian installation creates db.properties file that is
readable only by tomcat user
* Bug fix: api endpoints were exposed without 'api' prefix
* Bug fix: anonymous user could upload file using API
* Bug fix: when passing JSON in patch/post methods contentType was not
......
......@@ -27,15 +27,6 @@ set -e
case "$1" in
configure)
#if we update the package from version before flyway was introduced
if [ -f $DB_SCRIPT_DIR/db_${OLD_VERSION}_to_${MAX_DB_VERSION_FOR_MIGRTION}.sql ]; then
mkdir -p /usr/share/dbconfig-common/data/minerva/upgrade/pgsql/
cp $DB_SCRIPT_DIR/db_${OLD_VERSION}_to_${MAX_DB_VERSION_FOR_MIGRTION}.sql /usr/share/dbconfig-common/data/minerva/upgrade/pgsql/$CURRENT_VERSION
else
log "INFO: File doesn't exist: $DB_SCRIPT_DIR/db_${OLD_VERSION}_to_${MAX_DB_VERSION_FOR_MIGRTION}.sql"
fi
. /usr/share/dbconfig-common/dpkg/postinst.pgsql
dbc_generate_include_owner="root:root"
dbc_generate_include_perms="0640"
......@@ -68,7 +59,8 @@ case "$1" in
echo "database.uri=jdbc:postgresql://$dbserver:$dbport/$dbname" >> /etc/minerva/db.properties
echo "database.username=$dbuser" >> /etc/minerva/db.properties
echo "database.password=$dbpass" >> /etc/minerva/db.properties
chown `stat -c "%U:%G" /var/lib/$TOMCAT_PACKAGE/webapps` /etc/minerva/db.properties
chmod 0600 /etc/minerva/db.properties
fi
rm /etc/minerva/db.sh
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment