Skip to content
Snippets Groups Projects

Resolve "Debian package: use dbconfig-common"

Merged Piotr Gawron requested to merge 469-debian-package-use-dbconfig-common into master
1 file
+ 16
13
Compare changes
  • Side-by-side
  • Inline
+ 16
13
@@ -44,23 +44,26 @@ case "$1" in
@@ -44,23 +44,26 @@ case "$1" in
invoke-rc.d --force postgresql restart || true
invoke-rc.d --force postgresql restart || true
dbc_go minerva $@
dbc_go minerva $@
. /etc/minerva/db.sh
# if there is a config file generated by db_config_common (on upgrade this file might not be generated)
 
if [ -f /etc/minerva/db.sh ]
 
. /etc/minerva/db.sh
# when configuration was cancelled don't create config file
# when configuration was cancelled don't create config file
if [ ! -z "$dbuser" ]
if [ -z "$dbuser" ]
then
then
if [ -z "$dbport" ]
if [ -z "$dbport" ]
then
then
dbport=5432
dbport=5432
fi
fi
#create db configuration file
#create db configuration file
echo "database.uri=jdbc:postgresql://$dbserver:$dbport/$dbname" > /etc/minerva/db.properties
echo "database.uri=jdbc:postgresql://$dbserver:$dbport/$dbname" > /etc/minerva/db.properties
echo "database.username=$dbuser" >> /etc/minerva/db.properties
echo "database.username=$dbuser" >> /etc/minerva/db.properties
echo "database.password=$dbpass" >> /etc/minerva/db.properties
echo "database.password=$dbpass" >> /etc/minerva/db.properties
 
fi
 
rm /etc/minerva/db.sh
fi
fi
rm /etc/minerva/db.sh
#we have to restart tomcat, because application was started on the old database and it might crash during deployment
#we have to restart tomcat, because application was started on the old database and it might crash during deployment
#for instance in the new war file there was init script that uses some new database features, but they are not
#for instance in the new war file there was init script that uses some new database features, but they are not
Loading