[DRE-commits] [gitlab] 01/01: export all variables in gitlab-debian.conf

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Tue Feb 9 17:17:47 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 3a1a6bd4207f2927ceccc975d5fed086e2dcc563
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Tue Feb 9 22:41:02 2016 +0530

    export all variables in gitlab-debian.conf
---
 debian/conf/gitlab   | 3 ---
 debian/postinst      | 8 +++-----
 debian/rake-tasks.sh | 8 +++-----
 3 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/debian/conf/gitlab b/debian/conf/gitlab
index 9309400..d2511e6 100755
--- a/debian/conf/gitlab
+++ b/debian/conf/gitlab
@@ -11,9 +11,6 @@ RAILS_ENV="production"
 # Only exported variables will be passed on to gitlab app
 for i in $(cat /etc/gitlab/gitlab-debian.conf); do export $i; done
 
-# DB needs to be exported for some commands
-export DB=${DB}
-
 # app_user defines the user that GitLab is run as.
 # The default is "git".
 app_user=${gitlab_user}
diff --git a/debian/postinst b/debian/postinst
index 0b9b860..979e7df 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -31,12 +31,10 @@ case "$1" in
     # Show debconf questions
     . /usr/share/debconf/confmodule
 
-    # Read debian specific configuration
+    # Read and export debian specific configuration
+    # Only exported variables will be passed on to gitlab app
     gitlab_debian_conf=/etc/gitlab/gitlab-debian.conf
-    . ${gitlab_debian_conf}
-
-    # export DB for su command
-    export DB=${DB}
+    for i in $(cat ${gitlab_debian_conf}); do export $i; done
 
     # Create gitlab user
     . /usr/lib/gitlab/scripts/adduser.sh
diff --git a/debian/rake-tasks.sh b/debian/rake-tasks.sh
index c48f7c3..e903db0 100755
--- a/debian/rake-tasks.sh
+++ b/debian/rake-tasks.sh
@@ -1,9 +1,7 @@
 #! /bin/sh
-# Read configuration values	
-. /etc/gitlab/gitlab-debian.conf
-
-# export DB for su
-export DB=${DB}
+# Read and export debian specific configuration
+# Only exported variables will be passed on to gitlab app
+for i in $(cat /etc/gitlab/gitlab-debian.conf); do export $i; done
 
 echo "Initializing database..."
 su ${gitlab_user} -s /bin/sh -c 'bundle exec rake gitlab:setup RAILS_ENV=production force=yes'

-- 
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