diff --git a/debian/rake-tasks.sh b/debian/rake-tasks.sh index c0f202086a..30ab4ce4f1 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 \