[DRE-commits] [gitlab] 02/02: fix postgresql output check
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Tue Dec 12 17:08:57 UTC 2017
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch syslibs
in repository gitlab.
commit 64ad41b0b57d52b9970286ab07ec9b83e57d847d
Author: Pirate Praveen <praveen at debian.org>
Date: Tue Dec 12 22:36:30 2017 +0530
fix postgresql output check
---
debian/rake-tasks.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/debian/rake-tasks.sh b/debian/rake-tasks.sh
index c0f2020..30ab4ce 100755
--- a/debian/rake-tasks.sh
+++ b/debian/rake-tasks.sh
@@ -9,8 +9,9 @@ export DB RAILS_ENV
cd /usr/share/gitlab
# Check if the db is already present
-if [ "$(LANG=C runuser -u postgres -- sh -c "psql gitlab_production -c \"\d\"")" = \
-"No relations found." ]; then
+db_relations="$(LANG=C runuser -u postgres -- sh -c "psql gitlab_production -c \"\d\"")"
+if [ "$db_relations" = "No relations found." ] || \
+ [ "$db_relations" = "Did not find any relations." ]; then
echo "Initializing database..."
test -f ${gitlab_home}/db/schema.rb || \
runuser -u ${gitlab_user} -- sh -c \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gitlab.git
More information about the Pkg-ruby-extras-commits
mailing list