[DRE-commits] [gitlab] 01/02: configure hostname and email
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Sat Jan 23 18:33:01 UTC 2016
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository gitlab.
commit e77afc3a964ca357fdc69eee8c8bf001bd3ec407
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Sat Jan 23 23:47:33 2016 +0530
configure hostname and email
---
debian/postinst | 37 ++++++++++++++-----------------------
1 file changed, 14 insertions(+), 23 deletions(-)
diff --git a/debian/postinst b/debian/postinst
index c54478a..a1e5941 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -47,6 +47,19 @@ case "$1" in
su ${gitlab_user} -s /bin/sh -c "mkdir -p -m 750 ${gitlab_home}/public/uploads"
su ${gitlab_user} -s /bin/sh -c 'git config --global core.autocrlf "input"'
cd ${gitlab_home}
+ db_get gitlab/fqdn
+ if [ "${RET}" = "true" ]; then
+ db_go
+ if ! grep GITLAB_HOST /etc/gitlab/gitlab-debian.conf
+ then
+ echo export GITLAB_HOST=${RET} >> /etc/gitlab/gitlab-debian.conf
+ echo export GITLAB_EMAIL_FROM="no-reply@${RET}" >> /etc/gitlab/gitlab-debian.conf
+ echo export GITLAB_EMAIL_DISPLAY_NAME="Gitlab" >> /etc/gitlab/gitlab-debian.conf
+ echo export GITLAB_EMAIL_REPLY_TO="no-reply@${RET}" >> /etc/gitlab/gitlab-debian.conf
+ fi
+ fi
+ db_stop
+
echo "Create database if not present"
if ! su postgres -s /bin/sh -c "psql gitlab_production -c ''"
then
@@ -63,29 +76,7 @@ case "$1" in
# Move these to rails-common
. /usr/lib/gitlab/scripts/rake-tasks.sh
- # Get ssl choice
- db_get gitlab/ssl
- if [ "${RET}" = "true" ]; then
- db_go
- # Configure instance address.
- db_get gitlab/fqdn
- echo "SSL enabled, configuring nginx for ${RET}..."
- #/usr/lib/diaspora-common/scripts/set-env-nginx.sh ${RET}
- db_go
- else
- db_go
- # Configure instance address.
- db_get gitlab/fqdn
- echo "SSL disabled, skip nginx configuration for ${RET}..."
- #if ! grep SERVERNAME /etc/diaspora.conf
- #then
- # echo export SERVERNAME=${RET} >> /etc/diaspora.conf
- # export SERVERNAME=${RET}
- # echo export ENVIRONMENT_URL="http://$SERVERNAME:3000" >> /etc/diaspora.conf
- #fi
- fi
- db_stop
-
+
;;
abort-upgrade|abort-remove|abort-deconfigure)
--
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