From 3e93748c5210d3977e092305a057a036912d2fa6 Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Tue, 3 Jun 2014 09:18:05 +0000 Subject: [PATCH] SSDM-360: Tiny refactoring in function backupDatabase(). Cooment for function databaseExist() updated. SVN: 31633 --- installation/resource/installer/bin/backup-databases.sh | 6 ++---- installation/resource/installer/bin/common-functions.sh | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/installation/resource/installer/bin/backup-databases.sh b/installation/resource/installer/bin/backup-databases.sh index 06910f3b0c9..7ca81934eb7 100755 --- a/installation/resource/installer/bin/backup-databases.sh +++ b/installation/resource/installer/bin/backup-databases.sh @@ -61,10 +61,8 @@ function backupDatabase() { return fi - local user_name_for_check=$(getProperty $DB_PROPS "username") - if [ $(databaseExist $database $user_name_for_check) == "TRUE" ]; then - username=$(getProperty $DB_PROPS "username") - + username=$(getProperty $DB_PROPS "username") + if [ $(databaseExist $database $username) == "TRUE" ]; then local dumpDir=$BACKUP_DIR/$database echo "Backing up database $database to $dumpDir..." diff --git a/installation/resource/installer/bin/common-functions.sh b/installation/resource/installer/bin/common-functions.sh index b5fe23e67d5..6529ea683f6 100644 --- a/installation/resource/installer/bin/common-functions.sh +++ b/installation/resource/installer/bin/common-functions.sh @@ -45,7 +45,7 @@ contains() # # This function should be used as follows: # -# if [ $(databaseExist "openbis_prod") == "TRUE" ]; then doBackup; fi +# if [ $(databaseExist "openbis_prod" $owner) == "TRUE" ]; then doBackup; fi # databaseExist() { -- GitLab