update db checks

This commit is contained in:
Praveen Arimbrathodiyil 2015-11-03 17:44:51 +05:30
parent 6f4af34b27
commit 6cbbf28cc1

3
debian/postinst vendored
View file

@ -35,11 +35,12 @@ case "$1" in
# Show debconf questions
. /usr/share/debconf/confmodule
echo "Create database if not present"
if ! su gitlab -s /bin/sh -c "psql gitlab_production -c ''"
if ! su postgres -s /bin/sh -c "psql gitlab_production -c ''"
then
su postgres -c 'createdb gitlab_production'
fi
# Adjust database privileges
. /usr/lib/gitlab/scripts/grantpriv.sh
echo "Setting up environment varibales..."
export RAILS_ENV=production