fix postgresql output check
This commit is contained in:
parent
cfd79d8b71
commit
64ad41b0b5
1 changed files with 3 additions and 2 deletions
5
debian/rake-tasks.sh
vendored
5
debian/rake-tasks.sh
vendored
|
@ -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 \
|
||||
|
|
Loading…
Add table
Reference in a new issue