Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
61409681
Commit
61409681
authored
5 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
process db file only if it exists after db configuration
parent
f45c8361
No related branches found
No related tags found
1 merge request
!779
Resolve "Debian package: use dbconfig-common"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
debian/template/postinst
+16
-13
16 additions, 13 deletions
debian/template/postinst
with
16 additions
and
13 deletions
debian/template/postinst
+
16
−
13
View file @
61409681
...
...
@@ -44,23 +44,26 @@ case "$1" in
invoke-rc.d
--force
postgresql restart
||
true
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
if
[
!
-z
"
$dbuser
"
]
then
if
[
-z
"
$dbport
"
]
then
dbport
=
5432
fi
# when configuration was cancelled don't create config file
if
[
-z
"
$dbuser
"
]
then
if
[
-z
"
$dbport
"
]
then
dbport
=
5432
fi
#create db configuration file
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
#create db configuration file
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
fi
rm
/etc/minerva/db.sh
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
#for instance in the new war file there was init script that uses some new database features, but they are not
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment