switch to su
This commit is contained in:
parent
bcfcb14820
commit
9e86aa5a1a
1 changed files with 1 additions and 1 deletions
2
debian/rake-tasks.sh
vendored
2
debian/rake-tasks.sh
vendored
|
@ -4,7 +4,7 @@
|
||||||
export $(cat /etc/gitlab/gitlab-debian.conf|xargs)
|
export $(cat /etc/gitlab/gitlab-debian.conf|xargs)
|
||||||
|
|
||||||
echo "Initializing database..."
|
echo "Initializing database..."
|
||||||
if [ "$(sudo -u postgres psql gitlab_production -c '\d')" = \
|
if [ "$(su postgres -c 'psql gitlab_production -c \\d')" = \
|
||||||
"No relations found." ]; then
|
"No relations found." ]; then
|
||||||
su ${gitlab_user} -s /bin/sh -c 'bundle exec rake gitlab:setup \
|
su ${gitlab_user} -s /bin/sh -c 'bundle exec rake gitlab:setup \
|
||||||
RAILS_ENV=production force=yes'
|
RAILS_ENV=production force=yes'
|
||||||
|
|
Loading…
Add table
Reference in a new issue