Skip to content
Snippets Groups Projects
Commit d89b0435 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

when db configuration is cancelled don't create config file

parent fda1adee
No related branches found
No related tags found
1 merge request!779Resolve "Debian package: use dbconfig-common"
...@@ -46,16 +46,20 @@ case "$1" in ...@@ -46,16 +46,20 @@ case "$1" in
. /etc/minerva/db.sh . /etc/minerva/db.sh
if [ -z "$dbport" ] # when configuration was cancelled don't create config file
then if [ ! -z "$dbuser" ]
dbport=5432 then
fi if [ -z "$dbport" ]
then
dbport=5432
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 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment